Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add no-fail sass gulp task. Gulp build will fail and exit on sass errors, watches should not. #196

Merged
merged 2 commits into from
Nov 17, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/app.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/app.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
2 changes: 1 addition & 1 deletion lib/styleguide.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ module.exports = function(options) {
.finally(callback);
});
}
);
).on('error', console.error.bind(console));
};

/* Built-in server */
Expand Down