Closed anwalkers closed 3 years ago
Well this may not work... Some packages don't have a bower.json...
fs.readdir(cwd, function (err, files) {
var bowerfiles = [];
for (index = 0; index < files.length; ++index) {
file = files[index];
if (file[0] !== '.') {
filePath = cwd + '/' + file + '/bower.json';
var bowerconfig = JSON.parse(fs.readFileSync(filePath));
console.log(bowerconfig);
}
}
});
https://github.com/ck86/main-bower-files
This repo could either utilise the above package, or allow this implementation to be left to the consumer.
Feature definitely needed, if the package doesn't have a bower.json, there is a overrides
property that can be added in the project bower.json. As fallback, if there is no override, the whole content should be copied.
Add a way to have gulp-bower only copy the files specified in the bower.json "main" array. For example the angular.js bower.json file to a destination path...