-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
31 lines (28 loc) · 883 Bytes
/
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
var gulp = require('gulp');
var plumber = require('gulp-plumber');
var rename = require('gulp-rename');
var autoprefixer = require('gulp-autoprefixer');
var minifycss = require('gulp-minify-css');
var sass = require('gulp-sass');
gulp.task('build', function () {
gulp.src(['scss/netrice.scss'])
.pipe(plumber({
errorHandler: function (error) {
console.log(error.message);
this.emit('end');
}
}))
.pipe(sass())
.pipe(autoprefixer('last 2 versions'))
.pipe(gulp.dest('dist/'))
.pipe(rename({ suffix: '.min' }))
.pipe(minifycss())
.pipe(gulp.dest('dist/'))
.pipe(gulp.dest('docs/'))
});
gulp.task('watch', function () {
gulp.watch("scss/**/*.scss", ['build'])
})
gulp.task('default', function () {
gulp.watch("scss/**/*.scss", ['build']);
});