bap

bower-amd-paths

Populates "paths" for AMD (RequireJS) config with installed Bower components

Showing:

Popularity

Downloads/wk

44

GitHub Stars

0

Maintenance

Last Commit

7yrs ago

Contributors

0

Package

Dependencies

4

Size (min+gzip)

14.8KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

bower-amd-paths Build Status

Populates "paths" for AMD (RequireJS) config with installed Bower components

Install

$ npm install --save bower-amd-paths

Usage

var bowerAmdPaths = require('bower-amd-paths');

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 = require('bower-amd-paths')

bowerAmdPaths([options], callback)

options.cwd

Type: String

This should be base Bower directory, or directory where .bowerrc is located

bowerAmdPaths({cwd: './application'}, function(err, result){
    ...
});

callback

Type: Function

bowerAmdPaths(function(err, result){
    ...
});

err - error or null

results - array with paths

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100