Skip to content
This repository was archived by the owner on Sep 18, 2024. It is now read-only.

Commit fed3f98

Browse files
committed
Merge pull request #117 from Thoorium/master
Error handling for sass/less/stylus so Gulp doesn't crash
2 parents 9c93dca + 31e36d0 commit fed3f98

File tree

5 files changed

+13
-2
lines changed

5 files changed

+13
-2
lines changed

.dependencies.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@
3737
"gulp-stylus": "~2.0.0",
3838
"gulp-nodemon": "~2.0.2",
3939
"gulp-livereload": "~3.8.0",
40+
"gulp-plumber": "~1.0.0",
4041
"coffee-script": "~1.9.1"
4142
}

app/templates/basic-shared/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"gulp-less": "~3.0.1"<% } %><% if(options.cssPreprocessor == 'stylus'){ %>,
3737
"gulp-stylus": "~2.0.0"<% } %>,
3838
"gulp-nodemon": "~2.0.2",
39-
"gulp-livereload": "~3.8.0"<% } %>
39+
"gulp-livereload": "~3.8.0",
40+
"gulp-plumber": "~1.0.0"<% } %>
4041
}
4142
}

app/templates/extras/basic-shared/gulpfile.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
var gulp = require('gulp'),
22
nodemon = require('gulp-nodemon'),
3+
plumber = require('gulp-plumber'),
34
livereload = require('gulp-livereload')<% if(options.cssPreprocessor == 'sass'){ %>,
45
sass = require('gulp-ruby-sass')<% } %><% if(options.cssPreprocessor == 'node-sass'){ %>,
56
sass = require('gulp-sass')<% } %><% if(options.cssPreprocessor == 'less'){ %>,
@@ -17,6 +18,7 @@ gulp.task('watch', function() {
1718
});<% } %><% if(options.cssPreprocessor == 'node-sass'){ %>
1819
gulp.task('sass', function () {
1920
gulp.src('./public/css/*.scss')
21+
.pipe(plumber())
2022
.pipe(sass())
2123
.pipe(gulp.dest('./public/css'))
2224
.pipe(livereload());
@@ -27,6 +29,7 @@ gulp.task('watch', function() {
2729
});<% } %><% if(options.cssPreprocessor == 'less'){ %>
2830
gulp.task('less', function () {
2931
gulp.src('./public/css/*.less')
32+
.pipe(plumber())
3033
.pipe(less())
3134
.pipe(gulp.dest('./public/css'))
3235
.pipe(livereload());
@@ -37,6 +40,7 @@ gulp.task('watch', function() {
3740
});<% } %><% if(options.cssPreprocessor == 'stylus'){ %>
3841
gulp.task('stylus', function () {
3942
gulp.src('./public/css/*.styl')
43+
.pipe(plumber())
4044
.pipe(stylus())
4145
.pipe(gulp.dest('./public/css'))
4246
.pipe(livereload());

app/templates/extras/mvc-shared/gulpfile.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
var gulp = require('gulp'),
22
nodemon = require('gulp-nodemon'),
3+
plumber = require('gulp-plumber'),
34
livereload = require('gulp-livereload')<% if(options.cssPreprocessor == 'sass'){ %>,
45
sass = require('gulp-ruby-sass')<% } %><% if(options.cssPreprocessor == 'node-sass'){ %>,
56
sass = require('gulp-sass')<% } %><% if(options.cssPreprocessor == 'less'){ %>,
@@ -17,6 +18,7 @@ gulp.task('watch', function() {
1718
});<% } %><% if(options.cssPreprocessor == 'node-sass'){ %>
1819
gulp.task('sass', function () {
1920
gulp.src('./public/css/*.scss')
21+
.pipe(plumber())
2022
.pipe(sass())
2123
.pipe(gulp.dest('./public/css'))
2224
.pipe(livereload());
@@ -27,6 +29,7 @@ gulp.task('watch', function() {
2729
});<% } %><% if(options.cssPreprocessor == 'less'){ %>
2830
gulp.task('less', function () {
2931
gulp.src('./public/css/*.less')
32+
.pipe(plumber())
3033
.pipe(less())
3134
.pipe(gulp.dest('./public/css'))
3235
.pipe(livereload());
@@ -37,6 +40,7 @@ gulp.task('watch', function() {
3740
});<% } %><% if(options.cssPreprocessor == 'stylus'){ %>
3841
gulp.task('stylus', function () {
3942
gulp.src('./public/css/*.styl')
43+
.pipe(plumber())
4044
.pipe(stylus())
4145
.pipe(gulp.dest('./public/css'))
4246
.pipe(livereload());

app/templates/mvc-shared/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"gulp-less": "~3.0.1"<% } %><% if(options.cssPreprocessor == 'stylus'){ %>,
4848
"gulp-stylus": "~2.0.0"<% } %>,
4949
"gulp-nodemon": "~2.0.2",
50-
"gulp-livereload": "~3.8.0"<% } %>
50+
"gulp-livereload": "~3.8.0",
51+
"gulp-plumber": "~1.0.0"<% } %>
5152
}
5253
}

0 commit comments

Comments
 (0)