-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
45 lines (34 loc) · 1.18 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
40
41
42
43
44
45
'use strict';
let gulp = require('gulp'),
scss = require('gulp-sass'),
cleanCSS = require('gulp-clean-css'),
rename = require('gulp-rename');
/*
StyleSheets - Production codes
StyleSheets - Production codes
StyleSheets - Production codes
--------------
*/
// Path variables - GLOBAL styles
// Path variables - GLOBAL styles
let productionScss = './production/stylesheets/scss/',
productionCSS = './production/stylesheets/css/';
// compile task
gulp.task('production-css', function(){
return gulp.src(`${productionScss}style.scss`)
.pipe(scss())
.pipe( gulp.dest(productionCSS) )
.pipe(cleanCSS())
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest(`${productionCSS}`))
});
// watch for changes
gulp.task("watch-scss-components", function() {
gulp.watch(`./components/**/*.scss`, ['production-css'] );
});
/*
// DEFAULT task for terminal command: "gulp"
*/
gulp.task('default', ['production-css', 'watch-scss-components']);