nyc-bookstores/node_modules/browservefy/help.js
2013-05-27 13:45:59 -07:00

39 lines
1.4 KiB
JavaScript

module.exports = help
function help() {
/*
browservefy path/to/entry.js[:as.js] [PORT] -- [arguments to forward to browserify command]
Spins up a development server on ``http://localhost:PORT`` for working with static
files and browserifiable JavaScript modules.
If there's a path it doesn't recognize, it will serve up an empty HTML file with
your javascript entry point included as a script tag. Otherwise you can provide
your own ``index.html``.
All arguments after ``--`` are forwarded to the ``browserify-command``.
When the browser requests your entry point, it will run ``browserify-command`` with
the forwarded arguments on the file and pipe the results into the response.
If no PORT is defined, it defaults to 9966.
If you specify your file in the form ``realfile.js:as-file.js``, any request to
``as-file.js`` will browserify ``realfile.js`` and return it as the output.
arguments:
--browserify command The command to run to compile your entry point.
If not provided, defaults to ``./node_modules/.bin/browserify``,
and falls back to ``which browserify`` if that's not
available.
--live Enable live reloading. Reloads the page every time
your JavaScript changes.
*/
var str = help+''
process.stdout.write(str.slice(str.indexOf('/*')+3, str.indexOf('*/')))
}