-
Notifications
You must be signed in to change notification settings - Fork 3
/
Gulpfile.js
40 lines (34 loc) · 1.03 KB
/
Gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
var gulp = require('gulp'),
gulpLoadPlugins = require('gulp-load-plugins'),
plugins = gulpLoadPlugins(),
autoprefixer = require('gulp-autoprefixer'),
sourcemaps = require('gulp-sourcemaps')
sass = require('gulp-ruby-sass');
var app = 'src';
var onError = function(err) {
console.log(err);
};
gulp.task('Sass', function() {
gulp.src('app/scss/**/*.scss')
.pipe(plugins.plumber({
errorHandler: onError
}))
.pipe(sourcemaps.init())
.pipe(plugins.rubySass({
style: 'expanded',
check: true,
"sourcemap=none": true
}))
.pipe(plugins.rename({suffix: '.min'}))
.pipe(autoprefixer({
browsers: ['last 3 versions'],
cascade: false
}))
.pipe(plugins.minifyCss({keepSpecialComments:0}))
.pipe(sourcemaps.write())
.pipe(gulp.dest('inout/static/inout/'));
});
gulp.task('watch', function() {
gulp.watch('app/scss/**/*.scss', ['Sass']);
});
gulp.task('default', ['Sass']);