What is assets-include?
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.
What are the requirements?
Node.js 0.8.0+ (tested on CentOS, Ubuntu, and OS X 10.6+)
How to install assets-include?
npm install assets-include
How to use assets-include programmatically?
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
How to use assets-include CLI?
assetsinc accepts the following command line arguments.
What are the assets-include dev commands?
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.