forked from BookStackApp/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
28 lines (24 loc) · 807 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
var gulp = require('gulp'),
plumber = require('gulp-plumber'),
rename = require('gulp-rename');
var autoprefixer = require('gulp-autoprefixer');
var minifycss = require('gulp-minify-css');
var sass = require('gulp-sass');
gulp.task('styles', function(){
gulp.src(['themes/bookstack/sass/**/*.scss'])
.pipe(plumber({
errorHandler: function (error) {
console.log(error.message);
this.emit('end');
}}))
.pipe(sass())
.pipe(autoprefixer('last 2 versions'))
.pipe(gulp.dest('themes/bookstack/static/css/'))
.pipe(rename({suffix: '.min'}))
.pipe(minifycss())
.pipe(gulp.dest('themes/bookstack/static/css/'));
});
gulp.task('default', ['styles']);
gulp.task('watch', function() {
gulp.watch('themes/bookstack/sass/**/*.scss', ['styles']);
});