bower2array
List all installes Bower components in one single array
Install
npm install bower2array
From
app/
- bower_components/
-- componentA
--- component-a.js
-- componentB
--- dist
---- js
----- component-b.js
To
[
'app/bower_components/componentA/component-a.js',
'app/bower_components/componentB/dist/js/component-b.js'
]
How
var bower2array = ; bower2array;
Configure bower2array at once
bower2array;
Prioritize bower components
Some times components have dependencies. This will get listed as mention then the rest;
bower2array; 'app/bower_components/../angular.js' 'app/bower_components/../jquery.js' 'app/bower_components/../bootstrap.js' ...
External dependencies
Some times components have external dependencies
bower2array; 'public/javascripts/vendor/stripe.js' '/bower_components/angular-stripe/release/angular-stripe.js'
Ignore bower components
Ignore bower components
bower2array; 'app/bower_components/../angular.js' 'app/bower_components/../bootstrap.js' 'app/bower_components/../moment.js'
Change base path
If bower components are installed in a different directory by default app/bower_components/
bower2array;
Karma
Configuration file example
bower2array; bower2array; module{ // list of files / patterns to load in the browser files: _ };