Include assets into your views with ease (assets-packager compatible).
Assets-include is a Node.js tool for including your assets in HTML views.
This project is closely tied to Assets-Packager which can minify, enhance, and bundle your assets based on a YAML definition file.
See example apps for real-world use cases.
Node.js 0.8.0+ (tested on CentOS, Ubuntu, and OS X 10.6+)
npm install assets-include
var includer = 'assets.yml';includer;
AssetsInclude constructor accepts a hash as a 2nd parameter, i.e.,
truefor bundled, production mode,
falsefor development mode
root- root path of all assets, defaults to ./public under config's path
truefor cache boosters (timestamp in dev mode, md5 for bundled, production files)
assetHosts- prefixes all paths with given asset host(s)
AssetsInclude public methods will give you the following output:
group(locator)- a list of
<link>tag respectively. In development mode works the same way as
assetsinc 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
Assets-include is released under the MIT License.