From 52cd504c279d890c1bb4c3df67923f125780ddc0 Mon Sep 17 00:00:00 2001 From: Kalen Johnson Date: Fri, 31 Oct 2014 12:24:57 -0700 Subject: [PATCH] Added editor-style build to dev and build tasks --- gulpfile.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index bc195c4..717bb75 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -18,6 +18,7 @@ var paths = { 'assets/src/js/**/*' ], less: 'assets/src/less/main.less', + editorStyle: 'assets/src/less/editor-style.less', bower: mainBowerFiles() }; @@ -47,6 +48,17 @@ gulp.task('less:build', function() { .pipe(gulp.dest('assets/dist/css')); }); +gulp.task('less:editorStyle', function() { + return gulp.src(paths.editorStyle) + .pipe($.plumber()) + .pipe($.less()).on('error', function(err) { + console.warn(err.message); + }) + .pipe($.autoprefixer('last 2 versions', 'ie 9', 'android 2.3', 'android 4', 'opera 12')) + .pipe($.rename('./editor-style.css')) + .pipe(gulp.dest('assets/dist/css')); +}); + gulp.task('jshint', function() { return gulp.src(paths.jshint) .pipe($.jshint()) @@ -114,6 +126,6 @@ gulp.task('watch', function() { }); }); -gulp.task('default', ['less:dev', 'jshint', 'js:dev']); +gulp.task('default', ['less:dev', 'less:editorStyle', 'jshint', 'js:dev']); gulp.task('dev', ['default']); -gulp.task('build', ['less:build', 'js:build', 'copy:fonts', 'copy:jquery', 'copy:modernizr', 'images', 'version']); +gulp.task('build', ['less:build', 'less:editorStyle', 'js:build', 'copy:fonts', 'copy:jquery', 'copy:modernizr', 'images', 'version']);