Skip to content

Commit

Permalink
Add separate gulp task sass:no-fail for demo and watch mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Juuso Backman committed Nov 17, 2014
1 parent 76b9b6d commit 374bf6c
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,19 @@ gulp.task('bower', function() {
});

gulp.task('sass', function() {
return gulp.src('lib/app/sass/**/*.scss')
.pipe(sass({
// Include bourbon & neat
includePaths: neat.includePaths
}))
.pipe(sourcemaps.init())
.pipe(please({
minifier: false
}))
.pipe(gulp.dest(distPath + '/css'));
});

gulp.task('sass:no-fail', function() {
return gulp.src('lib/app/sass/**/*.scss')
.pipe(plumber())
.pipe(sass({
Expand Down Expand Up @@ -126,7 +139,7 @@ gulp.task('demo', function() {

// Watch changed styles in demo mode
gulp.watch(sourcePath + '/**/*.scss', function() {
runSequence('sass', 'styleguide');
runSequence('sass:no-fail', 'styleguide');
});
// Run serve first so socketIO options is enabled when building styleguide
return runSequence('styleguide');
Expand Down Expand Up @@ -158,7 +171,7 @@ gulp.task('watch', [], function() {
runSequence('build', 'styleguide');

gulp.watch('lib/app/sass/**/*.scss', function() {
runSequence('sass', 'styleguide');
runSequence('sass:no-fail', 'styleguide');
});
gulp.watch(['lib/app/js/**/*.js', '!lib/app/js/vendor/**/*.js'], function() {
gulp.start('jscs');
Expand Down

0 comments on commit 374bf6c

Please sign in to comment.