bower-amd-paths
Populates "paths" for AMD (RequireJS) config with installed Bower components
Install
$ npm install --save bower-amd-paths
Usage
var bowerAmdPaths = ;
if you have the following in your .bowerrc
"cwd": "webapp" "directory": "vendor"
this will return something similar to this:
jquery: 'webapp/vendor/jquery/dist/jquery' handlebars: 'webapp/vendor/handlebars/handlebars' bootstrap: 'webapp/vendor/bootstrap/dist/js/bootstrap' almond: 'webapp/vendor/almond/almond' 'lodash.compat': 'webapp/vendor/lodash/dist/lodash.compat' backbone: 'webapp/vendor/backbone-amd/backbone' }
API
var bowerAmdPaths =
bowerAmdPaths([options], callback)
options.cwd
Type: String
This should be base Bower directory, or directory where .bowerrc is located
;
callback
Type: Function
;
err - error or null
results - array with paths