Comparing version 0.1.1 to 0.2.0
@@ -9,6 +9,8 @@ module.exports = run | ||
var serve = require('./server') | ||
var portfinder = require('portfinder') | ||
, serve = require('./server') | ||
, colors = require('colors') | ||
, help = require('./help') | ||
, nopt = require('nopt') | ||
, open = require('open') | ||
@@ -30,2 +32,3 @@ var RESPONSE_MAP = [ | ||
, 'help': Boolean | ||
, 'open': Boolean | ||
, 'cwd': path | ||
@@ -39,2 +42,3 @@ } | ||
, 'h': ['--help'] | ||
, 'o': ['--open'] | ||
} | ||
@@ -92,15 +96,27 @@ | ||
}, {}) | ||
info('listening on '+port) | ||
return serve( | ||
cwd | ||
, browserify | ||
, entry_points | ||
, parsed.live | ||
, log | ||
).listen(port) | ||
server.listen(port) | ||
return server | ||
if(parsed.open) { | ||
portfinder.getPort(function(err, _port) { | ||
if(err) { | ||
console.log('could not automatically find port.') | ||
return | ||
} | ||
port = _port | ||
done() | ||
open('http://localhost:'+_port+'/') | ||
}) | ||
} | ||
function done() { | ||
info('listening on '+port) | ||
return serve( | ||
cwd | ||
, browserify | ||
, entry_points | ||
, parsed.live | ||
, log | ||
).listen(port) | ||
} | ||
function log(code, time, bytesize, logged_pathname, color) { | ||
@@ -107,0 +123,0 @@ if(logged_pathname.indexOf('/-') === 0) { |
{ | ||
"name": "beefy", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "local development server that aims to make using browserify fast and fun", | ||
@@ -23,3 +23,5 @@ "main": "index.js", | ||
"mime": "~1.2.9", | ||
"sse-stream": "0.0.2" | ||
"sse-stream": "0.0.2", | ||
"open": "0.0.3", | ||
"portfinder": "~0.2.1" | ||
}, | ||
@@ -26,0 +28,0 @@ "bin": { |
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
14656
375
9
+ Addedopen@0.0.3
+ Addedportfinder@~0.2.1
+ Addedmkdirp@0.0.7(transitive)
+ Addedopen@0.0.3(transitive)
+ Addedportfinder@0.2.1(transitive)