cartero-node-hook-sync
Like cartero-node-hook but reading the assets deifition on the constructor
Installation
npm install cartero-node-hook-sync
Usage
var hook = ;var path = ; var h = ; // get the js and css html of a parcelvar assets = h;// assets.script is a string with the url for the bundle// assets.style is a string with the url for the bundle// assets.image is a array with all the url for the images
API
h = hook( outputDirPath, options );
outputDirPath
is the absolute path to your cartero output directory, as passed into cartero at build time. options
may contain:
cache
(default:true
) - whether or not to cache meta data. Set tofalse
in dev mode so that you don't need to restart your application when assets are changed.
assets = h.getParcelAssets( parcelPath )
Returns a hash of asset paths keyed by asset type
h
License
MIT
Change log
v0.0.1
- First version