gulp-webserver
gulp-webserver copied to clipboard
Automatically open browser?
Great plug-in. I am able to run my gulp command and start the localhost and everything works. The only part of the config that I do not fully understand is how to automatically open the browser.
The documentation says "open:" accepts a boolean / string. I believe the string would be the path. However, I am not sure which path it is referencing. Any assistance with this is much appreciated.
Here is my task: //Webserver gulp.task('webserver', function() { gulp.src('app/builds/development/') .pipe(webserver({ livereload: true, directoylisting: false, open: true })) });
- open: false -> doesn't open,
- open: true -> opens in browser,
- open: String ->
- if string begins with 'http', the opened url will be the string as-is.
- else, open will be appended after the port.
Can I choose the browser instead of the default one? Eg. I use the Safari as the default browser for daily web browsing, but I use Chrome mainly for development.
So I hope it can open the Chrome in my case.
@richdyang +1
choose would be nice