Comparing version 3.0.0-rc1 to 3.0.0-rc2
@@ -31,8 +31,3 @@ #!/usr/bin/env node | ||
if (opts.o || opts.outfile) { | ||
console.error('ERROR:\n --outfile has been removed in budo@3.0') | ||
return | ||
} | ||
var basePort = opts.port || opts.p || 9966 | ||
var basePort = opts.port || 9966 | ||
getport(basePort, function(err, port) { | ||
@@ -39,0 +34,0 @@ if (err) { |
@@ -5,14 +5,18 @@ Usage: | ||
Options: | ||
--help, -h show help message | ||
--outfile, -o path to output bundle | ||
--port the port to run, default 9966 | ||
--host the host, default "localhost" | ||
--dir the directory to serve, and the base for --outfile | ||
--live enable LiveReload integration | ||
--live-plugin enable LiveReload but do not inject script tag | ||
--live-port the LiveReload port, default 35729 | ||
--help, -h show help message | ||
--port the port to run, default 9966 | ||
--host the host, default "localhost" | ||
--dir the directory to serve, and the base for --outfile | ||
--live enable LiveReload integration | ||
--live-plugin enable LiveReload but do not inject script tag | ||
--live-port the LiveReload port, default 35729 | ||
--verbose, -v verbose timing information for re-bundles | ||
--poll=N use polling for file watch, with optional interval N | ||
Other Options: | ||
https://github.com/substack/node-browserify | ||
Examples: | ||
budo index.js --live --dir app/ --outfile bundle.js | ||
budo src/index.js --live --dir app | ||
budo index.js --verbose --transform brfs | ||
budo index.js:test.js --port 3000 | ||
budo index.js:bundle.js --port 8000 |
17
index.js
@@ -5,2 +5,3 @@ var bole = require('bole') | ||
var budo = require('./lib/budo') | ||
var url = require('url') | ||
@@ -19,7 +20,11 @@ module.exports = function(entry, opts) { | ||
if (argv.o || argv.outfile) { | ||
log.warn('--outfile has been removed in budo@3.0') | ||
} | ||
var entries = Array.isArray(entry) ? entry : [entry] | ||
entries = entries.filter(Boolean) | ||
if (entries.length === 0) { | ||
bail("No entry scripts specified!") | ||
return emitter | ||
return bail("No entry scripts specified!") | ||
} | ||
@@ -43,3 +48,6 @@ | ||
argv.dir = argv.dir || process.cwd() | ||
argv.serve = file | ||
argv.serve = url.parse(file).path | ||
if (typeof argv.dir !== 'string') | ||
return bail('--dir must be a path') | ||
@@ -78,3 +86,3 @@ //run watchify server | ||
} | ||
return { from: entry, to: 'bundle.js' } | ||
return { from: entry, to: entry } | ||
} | ||
@@ -86,3 +94,4 @@ | ||
}) | ||
return emitter | ||
} | ||
} |
@@ -223,6 +223,8 @@ var Emitter = require('events/') | ||
delete opt.live | ||
delete opt.serve | ||
delete opt['live-port'] | ||
delete opt['live-script'] | ||
delete opt['live-plugin'] | ||
return entries.concat(dargs(opt)) | ||
} |
@@ -11,2 +11,3 @@ var ecstatic = require('ecstatic') | ||
var Emitter = require('events/') | ||
var url = require('url') | ||
@@ -55,3 +56,3 @@ module.exports = function(opts) { | ||
router.addRoute('/' + opts.serve, function(req, res) { | ||
router.addRoute('/' + url.parse(opts.serve).pathname, function(req, res) { | ||
log.info({ | ||
@@ -58,0 +59,0 @@ url: req.url, |
@@ -5,5 +5,5 @@ var log = require('bole')('budo') | ||
var debounce = require('debounce') | ||
var path = require('path') | ||
var concat = require('concat-stream') | ||
//Eventually this may split into a watchify-server module | ||
module.exports = function(watchifyArgs, opt) { | ||
@@ -10,0 +10,0 @@ var emitter = new Emitter() |
{ | ||
"name": "budo", | ||
"version": "3.0.0-rc1", | ||
"version": "3.0.0-rc2", | ||
"description": "a browserify server for rapid prototyping", | ||
@@ -17,7 +17,7 @@ "main": "index.js", | ||
"bole": "^2.0.0", | ||
"chokidar": "^1.0.0-rc5", | ||
"chokidar": "^1.0.1", | ||
"concat-stream": "^1.4.8", | ||
"dargs": "^4.0.0", | ||
"debounce": "^1.0.0", | ||
"ecstatic": "^0.5.8", | ||
"ecstatic": "^0.7.2", | ||
"events": "^1.0.2", | ||
@@ -36,20 +36,15 @@ "getport": "^0.1.0", | ||
"2d-context": "^1.2.0", | ||
"browserify": "^8.1.3", | ||
"brfs": "^1.4.0", | ||
"browserify": "^9.0.8", | ||
"canvas-fit": "^1.2.0", | ||
"concat-stream": "^1.4.7", | ||
"domready": "^1.0.7", | ||
"garnish": "^2.0.1", | ||
"garnish": "^2.1.2", | ||
"inject-lr-script": "^1.0.1", | ||
"ndjson": "^1.3.0", | ||
"npm-execspawn": "^1.0.6", | ||
"raf-loop": "^1.0.1", | ||
"request": "^2.53.0", | ||
"rimraf": "^2.3.2", | ||
"tap-finished": "0.0.1", | ||
"tap-spec": "^2.2.1", | ||
"tape": "^3.5.0", | ||
"tree-kill": "0.0.6", | ||
"tap-spec": "^3.0.0", | ||
"tape": "^4.0.0", | ||
"uglify-js": "^2.4.19", | ||
"watchify": "^3.0.1", | ||
"win-spawn": "^2.0.0" | ||
"vm": "0.0.1", | ||
"watchify": "^3.1.0" | ||
}, | ||
@@ -56,0 +51,0 @@ "scripts": { |
@@ -13,18 +13,18 @@ # budō | ||
The simplest use cases will start up a server with a default `index.html` and incrementally bundle your source on filesave. The requests are delayed until the bundle has finished, so you aren't served stale or empty bundles. Examples: | ||
The simplest use cases will start up a server with a default `index.html` and incrementally bundle your source on filesave. The requests are delayed until the bundle has finished, so you won't be served stale or empty bundles if you refresh the page mid-update. Examples: | ||
```sh | ||
#run watchify on port 9966 | ||
# serve file on port 9966 | ||
budo index.js | ||
#run watchify with timing information | ||
# show timing information on re-bundle | ||
budo index.js --verbose | ||
#run watchify with some options and trigger LiveReload on JS/HTML/CSS file change | ||
budo index.js --live --transform brfs | ||
# transpile ES6 and trigger LiveReload on html/css/js change | ||
budo index.js --live --transform babelify | ||
``` | ||
You can open `localhost:9966` to see the content in action. | ||
Then open [http://localhost:9966](http://localhost:9966) to see the content in action. | ||
To pretty-print in terminal, [garnish](https://github.com/mattdesl/garnish), [bistre](https://github.com/hughsk/bistre) or another [ndjson](http://ndjson.org)-based stream can be used. | ||
To pretty-print in terminal, [garnish](https://github.com/mattdesl/garnish), [bistre](https://github.com/hughsk/bistre) or another [ndjson](http://ndjson.org)-based stream can be used: | ||
@@ -35,6 +35,4 @@ ```sh | ||
See [docs](#docs) for more features. | ||
See [docs](#docs) for more features. PRs/suggestions/comments welcome. | ||
PRs/suggestions/comments welcome. | ||
## docs | ||
@@ -56,19 +54,21 @@ | ||
Details for `budo` command-line interface. Other options like `--verbose` and `--transform` are sent to browserify/watchify. | ||
Details for `budo` command-line interface. Other options like `--transform` are sent to browserify/watchify. | ||
```sh | ||
Usage: | ||
budo [entries] [opts] | ||
budo [entries] [opts] | ||
Options: | ||
--help, -h show help message | ||
--port the port to run, default 9966 | ||
--host the host, default "localhost" | ||
--dir the directory to serve, and the base for --outfile | ||
--live enable LiveReload integration with a script tag | ||
--live-plugin enable LiveReload for use with a browser plugin | ||
--live-port the LiveReload port, default 35729 | ||
--help, -h show help message | ||
--port the port to run, default 9966 | ||
--host the host, default "localhost" | ||
--dir the directory to serve, and the base for --outfile | ||
--live enable LiveReload integration | ||
--live-plugin enable LiveReload but do not inject script tag | ||
--live-port the LiveReload port, default 35729 | ||
--verbose, -v verbose timing information for re-bundles | ||
--poll=N use polling for file watch, with optional interval N | ||
``` | ||
By default, the `--debug` option will be sent to watchify (for source maps). If this is unwanted, you can use `--no-debug` or `--debug=false` to disable source maps. | ||
By default, the `--debug` option will be sent to browserify (for source maps). If this is unwanted, you can use `--no-debug` or `--debug=false` to disable source maps. | ||
@@ -75,0 +75,0 @@ ### API |
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
24825
14
631
+ Addedecstatic@0.7.6(transitive)
+ Addedurl-join@0.0.1(transitive)
- Removedecstatic@0.5.8(transitive)
Updatedchokidar@^1.0.1
Updatedecstatic@^0.7.2