crunchicorn takes two arguments:
<script src=...>element. Transpiled, resolved, validated, crunched, everything.
Assuming you keep your source tree in
src/, which contains ES2015 syntax code, imports, CSS, etc, and the entry point is
This single command (no config necessary) will do everything to validate, transpile, resolve modules, drop dead code, and compress into a single file:
$ crunchicorn src/myapp.js out/myapp.js
The resulting file is now ready to be used directly in your web-app. It will include all dependencies and even inject your CSS:
Voila. No config - it just worked!
You can leave crunchicorn running and it will automatically rebuild whenever it notices any files have changed:
$ crunchicorn --watch src/myapp.js out/myapps.js
$ npm install -g crunchicorn
Alternatively, install just for your current project:
$ npm install --save-dev crunchicorn
Note: If not installed globally, you'll need to include node_module/.bin in your path
$ crunchicorn --help