Skip to content
Browse files

add new cli functionality to readme

  • Loading branch information...
1 parent db1b63c commit 5637f008eed2a8deb147498424586bdcece94b4c @defunctzombie committed
Showing with 12 additions and 1 deletion.
  1. +11 −0
  2. +1 −1 bin/script
@@ -113,3 +113,14 @@ You now just have to specify one file in your html and the rest is automatially
foobar.js will not contain any code for the widgets module and will instead request it from `/route/to/widgets.js` before executing the foobar module code.
+### cli ###
+The ```script``` cli tool allows you to bundle up your package for others to use client side without needing to use script or other automatic bundlers. This is useful if you don't work in a node.js environment and want to make distributed versions of your library.
+script --name "my_module" ./path/to/entry/point.js
+Script will load the javascript file at the specified path and bundle all of the dependencies into a single file. The entry point module will be exposed to a variable with the given name (i.e. my_module).
+If you want to minify the output, just pass the ```--minify``` option and the output will be run through uglify-js.
2 bin/script
@@ -25,7 +25,7 @@ var argv = require('optimist')
.check(function (argv) {
if ( throw ''
- if (process.argv.length <= 2) throw 'Specify a parameter.'
+ if (process.argv.length <= 2) throw 'specify a javascript filename.'

0 comments on commit 5637f00

Please sign in to comment.
Something went wrong with that request. Please try again.