grunt-contrib-connect
Advanced tools
Comparing version 0.4.2 to 0.5.0
{ | ||
"name": "grunt-contrib-connect", | ||
"description": "Start a connect web server.", | ||
"version": "0.4.2", | ||
"version": "0.5.0", | ||
"homepage": "https://github.com/gruntjs/grunt-contrib-connect", | ||
@@ -32,3 +32,4 @@ "author": { | ||
"connect": "~2.7.11", | ||
"connect-livereload": "~0.2.0" | ||
"connect-livereload": "~0.2.0", | ||
"open": "0.0.4" | ||
}, | ||
@@ -35,0 +36,0 @@ "devDependencies": { |
@@ -1,2 +0,2 @@ | ||
# grunt-contrib-connect v0.4.2 [![Build Status](https://travis-ci.org/gruntjs/grunt-contrib-connect.png?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-connect) | ||
# grunt-contrib-connect v0.5.0 [![Build Status](https://travis-ci.org/gruntjs/grunt-contrib-connect.png?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-connect) | ||
@@ -89,2 +89,8 @@ > Start a connect web server. | ||
#### open | ||
Type: `Boolean` or `String` | ||
Default: `false` | ||
Open the served page in your default browser. Specifying `true` opens the default server URL, while specifying a URL opens that URL. | ||
#### middleware | ||
@@ -260,2 +266,3 @@ Type: `Function` | ||
* 2013-09-05 v0.5.0 Add 'open' option. | ||
* 2013-09-05 v0.4.2 Un-normalize options.base as it should be a string or an array as the user has set. Fix setting target hostname option. | ||
@@ -276,2 +283,2 @@ * 2013-09-02 v0.4.1 Browse-able directory is the last item supplied to bases. Added directory option to override browse-able directory. | ||
*This file was generated on Thu Sep 05 2013 13:13:36.* | ||
*This file was generated on Thu Sep 05 2013 14:09:10.* |
@@ -17,2 +17,3 @@ /* | ||
var injectLiveReload = require('connect-livereload'); | ||
var open = require('open'); | ||
@@ -30,2 +31,3 @@ grunt.registerMultiTask('connect', 'Start a connect web server.', function() { | ||
livereload: false, | ||
open: false, | ||
middleware: function(connect, options) { | ||
@@ -116,2 +118,8 @@ var middlewares = []; | ||
if (options.open === true) { | ||
open(options.protocol + '://' + address.address + ':' + address.port); | ||
} else if (typeof options.open === 'string') { | ||
open(options.open); | ||
} | ||
if (!keepAlive) { | ||
@@ -118,0 +126,0 @@ done(); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27022
214
282
4
+ Addedopen@0.0.4
+ Addedopen@0.0.4(transitive)