bower-license
Advanced tools
Comparing version 0.2.5 to 0.2.6
@@ -11,11 +11,12 @@ var treeify = require('treeify'); | ||
exports.init = function(options, callback){ | ||
options = _.extend({}, options, {directory: 'bower_components'}); | ||
// read .bowerrc | ||
if (fs.existsSync('.bowerrc')){ | ||
try {options = JSON.parse(fs.readFileSync('.bowerrc'))} | ||
catch(e){} | ||
try { | ||
options = _.extend({}, JSON.parse(fs.readFileSync('.bowerrc')), options); | ||
} catch(e){} | ||
} | ||
options = _.extend({}, {directory: 'bower_components'}, options); | ||
// check each bower package recursively | ||
if (!fs.existsSync(options.directory)){ | ||
throw 'No bower components found. Run bower install first'; | ||
throw 'No bower components found in ' + options.directory + '. Run bower install first or check your .bowerrc file'; | ||
} | ||
@@ -22,0 +23,0 @@ var packages = fs.readdirSync(options.directory); |
{ | ||
"name": "bower-license", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "Generates a list of bower dependencies for a project", | ||
@@ -5,0 +5,0 @@ "preferGlobal": "true", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19521
74