Created
March 1, 2015 20:51
-
-
Save misscs/730e024938a371b7b369 to your computer and use it in GitHub Desktop.
Bower tasks for gulp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bower = require('bower'); | |
var bowerFiles = require('main-bower-files'); | |
var del = require('del'); | |
gulp.task('bower-clean-sass', function (cb) { | |
del(['assets/stylesheets/plugins/bower'], cb); | |
}); | |
gulp.task('bower-clean', ['bower-clean-sass']); | |
gulp.task('bower-install', function (cb) { | |
bower.commands.install([]) | |
.on('end', function () { | |
cb(); | |
}); | |
}); | |
gulp.task('bower-sass', ['bower-clean-sass', 'bower-install'], function () { | |
return gulp.src(bowerFiles({ | |
includeDev: true, | |
filter: ['**/*.scss', '**/*.css'], | |
}), {base: 'bower_components'}) | |
.pipe(gulp.dest('assets/stylesheets/plugins/bower')); | |
}); | |
gulp.task('bower', ['bower-sass']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment