-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathgulpfile.js
38 lines (32 loc) · 1006 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
// Include gulp
var gulp = require('gulp');
var gutil = require('gulp-util');
var watch = require('gulp-watch');
var sass = require('gulp-sass');
var notify = require('gulp-notify');
var gulpcleancss = require('gulp-clean-css');
var sassBuild = function () {
gulp.src('assets/sass/**.scss')
.pipe(sass({
errLogToConsole: false,
outputStyle: 'compressed'
}))
.pipe(gulp.dest('assets/css'))
.pipe(notify(
{
message: 'SASS compiled.',
onLast: true
}
));
};
// Compile sass
gulp.task('sass', sassBuild);
// Watch Files For Changes
gulp.task('watch', ['sass'], function () {
gutil.log(gutil.colors.bgGreen('Watching for changes, Ctrl+C to exit'));
gutil.log(gutil.colors.yellow('Only listening for Sass changes in _sass/'));
// Watch .scss files
gulp.watch(['assets/sass/**/*.*'], ['sass']);
});
// The default task (called when you run `gulp` from cli)
gulp.task('default', ['sass']);