Velociraptor
Node.js asset compiler that supports JavaScript, Handlebars, CSS and LESS.
What It Does
Velociraptor will compile assets in a source
directory and dump them into an output
directory.
- Velociraptor will first build the bundles defined in
source/bundles.json
- Any files in
source
that were not part of a bundle will be copied tooutput
- Important:
.less
files will not be copied as part of this step as they are expected to be part of a bundle.
bundles.json example
Handlebars
To precompile, put your templates in a directory and Velociraptor will recursively discover your templates. Note the special syntax in bundles.json
-- you must define a directory, not the individual files.
Command-line Usage
# Compile from ./assets to ./tmp # without minification velociraptor ./assets ./tmp # Compiling: /somepath/assets # into: /somepath/tmp # without minification # Compiled 2 bundles from 7 sources # Copied 4 # Compiling with minification velociraptor -m ./assets ./tmp
Programmatic Usage
var Velociraptor = ; //No minificationVelociraptor; //MinificationVelociraptor;