Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically open browser? #53

Open
jlister76 opened this issue Oct 21, 2014 · 4 comments
Open

Automatically open browser? #53

jlister76 opened this issue Oct 21, 2014 · 4 comments

Comments

@jlister76
Copy link

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
}))
});

@dasilvacontin
Copy link
Contributor

  • 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.

@chaoyangnz
Copy link

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.

@NMichas
Copy link

NMichas commented Dec 9, 2015

@richdyang +1

@juri33
Copy link

juri33 commented Nov 30, 2016

choose would be nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants