gulp-bower
Advanced tools
Comparing version 0.0.3 to 0.0.4
32
index.js
@@ -15,3 +15,17 @@ var bower = require('bower'); | ||
bower.commands.install() | ||
var dir; | ||
if (bower_dir) | ||
dir = bower_dir; | ||
else { | ||
if (fs.existsSync('./.bowerrc')) { | ||
var bower_config = JSON.parse(fs.readFileSync('./.bowerrc')); | ||
dir = bower_config.directory; | ||
} | ||
if (typeof(dir) === 'undefined' || dir === null || dir === '') { | ||
dir = './bower_components'; | ||
} | ||
} | ||
gutil.log("Using bower dir: ", dir); | ||
bower.commands.install([], {}, {directory: dir}) | ||
.on('log', function(result) { | ||
@@ -25,18 +39,2 @@ gutil.log(['bower', gutil.colors.cyan(result.id), result.message].join(' ')); | ||
.on('end', function() { | ||
var dir; | ||
if(bower_dir !== null && typeof(bower_dir) !== 'undefined' && bower_dir !== '') { | ||
dir = bower_dir; | ||
} else { | ||
if(fs.existsSync('./.bowerrc')) { | ||
var bower_config = JSON.parse(fs.readFileSync('./.bowerrc')); | ||
dir = bower_config.directory; | ||
} | ||
if(typeof(dir) === 'undefined' || dir === null || dir === "") { | ||
dir = './bower_components'; | ||
} | ||
} | ||
gutil.log("Using bower dir: ", dir); | ||
var walker = walk.walk(dir); | ||
@@ -43,0 +41,0 @@ walker.on("errors", function(root, stats, next) { |
{ | ||
"name": "gulp-bower", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Install Bower packages.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -40,2 +40,5 @@ # gulp-bower | ||
#####0.0.4 | ||
- fixed custom bower directory bug | ||
#####0.0.3 | ||
@@ -42,0 +45,0 @@ - add logging (by squarejaw) |
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
51
4841