-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
44 lines (37 loc) · 929 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
32
33
34
35
36
37
38
39
40
41
42
43
44
// Requires:
var base64 = require('gulp-base64');
var concat = require('gulp-concat');
var cssmin = require('gulp-minify-css');
var gulp = require('gulp');
var sass = require('gulp-sass');
// Setup:
var paths = {
frontend: {
scss: {
dest: 'frontend/html/css/',
min: {
dest: 'app.min.css',
src: 'app.css'
},
src: ['frontend/scss/**/*.scss']
}
}
};
gulp.task('scss', function() {
var path = paths.frontend.scss;
return gulp.src(path.src)
.pipe(base64())
.pipe(sass())
.pipe(gulp.dest(path.dest));
});
gulp.task('scss-min', function() {
var path = paths.frontend.scss;
return gulp.src(path.dest + path.min.src)
.pipe(cssmin())
.pipe(concat(path.min.dest))
.pipe(gulp.dest(path.dest));
});
gulp.task('watch', function() {
gulp.watch([paths.frontend.scss.src], ['scss', 'scss-min']);
});
gulp.task('default', ['watch', 'scss', 'scss-min']);