Use wiredep for sass and less injection

https://github.com/taptapship/wiredep
all third-party deps are injected via wiredep rather than manually managed
This commit is contained in:
Austin Pray
2014-11-23 22:23:36 -06:00
parent e2091ef880
commit df004917b7
4 changed files with 13 additions and 95 deletions

View File

@@ -102,7 +102,7 @@ var cssTasks = function(filename) {
.pipe(gulp.dest, path.dist + 'styles')();
};
gulp.task('styles', ['styles:editorStyle'], function() {
gulp.task('styles', ['wiredep', 'styles:editorStyle'], function() {
return gulp.src(globs.styles)
.pipe(cssTasks('main.css'));
});
@@ -173,6 +173,7 @@ gulp.task('watch', function() {
$.livereload.listen();
gulp.watch([path.src + 'styles/**/*', 'bower.json'], ['styles']);
gulp.watch([path.src + 'scripts/**/*', 'bower.json'], ['jshint', 'scripts']);
gulp.watch(['bower.json'], ['wiredep']);
gulp.watch('**/*.php').on('change', function(file) {
$.livereload.changed(file.path);
});
@@ -182,6 +183,13 @@ gulp.task('build', ['styles', 'scripts', 'fonts', 'images'], function () {
gulp.start('version');
});
gulp.task('wiredep', function () {
var wiredep = require('wiredep').stream;
gulp.src(obj.get(manifest, 'dependencies.theme.styles'))
.pipe(wiredep())
.pipe(gulp.dest(manifest.buildPaths.src + 'styles/'));
});
gulp.task('default', ['clean'], function () {
gulp.start('build');
});