From 769b8e4c011d88becff580272aaad4c2068e67c4 Mon Sep 17 00:00:00 2001 From: vlad Date: Tue, 21 Oct 2014 17:21:40 +0200 Subject: [PATCH 1/2] browser parameter --- README.md | 4 +++- src/index.js | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0964836..61b6d92 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,8 @@ gulp.task('webserver', function() { .pipe(webserver({ livereload: true, directoryListing: true, - open: true + open: true, + browser: 'firefox' })); }); ``` @@ -42,6 +43,7 @@ Key | Type | Default | Description | `https` | Boolean/Object | `false` | whether to use https or not. By default, `gulp-webserver` provides you with a development certificate but you remain free to specify a path for your key and certificate by providing an object like this one: `{key: 'path/to/key.pem', cert: 'path/to/cert.pem'}`. `middleware` | Array | `[]` | *feature coming soon* `proxies` | Array | `[]`| a list of proxy objects. Each proxy object can be specified by `{source: '/abc', target: 'http://localhost:8080/abc'}`. +`browser` | String | `"firefox"` | browser name ## FAQ diff --git a/src/index.js b/src/index.js index bf33224..79b4498 100644 --- a/src/index.js +++ b/src/index.js @@ -30,6 +30,7 @@ module.exports = function(options) { fallback: false, https: false, open: false, + browser: undefined, /** * @@ -88,7 +89,7 @@ module.exports = function(options) { var openInBrowser = function() { if (config.open === false) return; - open('http' + (config.https ? 's' : '') + '://' + config.host + ':' + config.port + (typeof config.open === 'string' ? config.open : '')); + open('http' + (config.https ? 's' : '') + '://' + config.host + ':' + config.port + (typeof config.open === 'string' ? config.open : ''), config.browser); }; var lrServer; From 9373066244d45d59c7ab65eac3b3f4143853429e Mon Sep 17 00:00:00 2001 From: vlad Date: Tue, 21 Oct 2014 17:37:44 +0200 Subject: [PATCH 2/2] browser parameter --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 61b6d92..da59c3b 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Key | Type | Default | Description | `https` | Boolean/Object | `false` | whether to use https or not. By default, `gulp-webserver` provides you with a development certificate but you remain free to specify a path for your key and certificate by providing an object like this one: `{key: 'path/to/key.pem', cert: 'path/to/cert.pem'}`. `middleware` | Array | `[]` | *feature coming soon* `proxies` | Array | `[]`| a list of proxy objects. Each proxy object can be specified by `{source: '/abc', target: 'http://localhost:8080/abc'}`. -`browser` | String | `"firefox"` | browser name +`browser` | String | `undefined` | browser name ## FAQ