CSS bundles are created from assets which are:
- compiled from LESS templates (optional),
- minified using clean-css,
- preprocessed via enhance-css (inline images, asset hosts, etc),
- and packaged (and optionally precompressed).
- minified using UglifyJS,
- and packaged (and optionally precompressed)
node.js 0.8.0+ on *nix (fully tested on OS X 10.6+ and CentOS) and Windows
npm install -g assets-packager
OK. Here are commands to run
git clone firstname.lastname@example.org:GoalSmashers/assets-packager.git cd assets-packager/examples assetspkg -c assets.yml -g
You should have just witnessed it by yourself. :-)
So yes, it is fast!
First of all it assumes Rails-like directory structure for your assets, e.g:
- some scripts
- some styles
Then it needs a configuration file (here we name it assets.yml) with a definition of JS/CSS bundles, e.g:
We recommend placing it somewhere else than in your public folder.
Now you can bundle all these packages with a single command:
assetspkg -c assets.yml
Assets-packager accepts the following command line arguments:
First clone the source, then run:
npm run checkto check JS sources with JSHint
npm testfor the test suite
Open an issue. Or better: fork the project, add the feature (don't forget about tests!) and send a pull request.
- Jean-Denis Vauguet @chikamichi -
--indentoptions allow for combination-only processing.
Assets-packager is released under the MIT License.