-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathGulpfile.js
36 lines (32 loc) · 1.08 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
var gulp = require('gulp');
var sass = require('gulp-sass');
var sassdoc = require('sassdoc');
var converter = require('sass-convert');
var autoprefixer = require('gulp-autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
gulp.task('sass', function(){
gulp.src('blink_sass/style.sass')
.pipe(sass().on('error', sass.logError))
.pipe(sourcemaps.init())
.pipe(autoprefixer())
.pipe(sourcemaps.write())
.pipe(gulp.dest('static/css/'));
})
gulp.task('bootstrap-sass', function(){
gulp.src('blink_sass/vendor/vendor.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('static/css/'));
})
gulp.task('sass-convert', function(){
gulp.src('blink_sass/variables.sass')
.pipe(converter({
from: 'sass',
to: 'scss',
rename: true
}))
.pipe(gulp.dest('blink_sass/vendor/'));
})
gulp.task('default', function(){
gulp.watch('blink_sass/**/*.sass', ['sass']);
gulp.watch(['blink_sass/variables.sass', 'blink_sass/**/*.scss'], ['sass-convert', 'bootstrap-sass']);
})