-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
38 lines (34 loc) · 947 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
var gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
cssnano = require('gulp-cssnano'),
rename = require('gulp-rename'),
notify = require('gulp-notify'),
nodemon = require('gulp-nodemon');
gulp.task('styles', function () {
// return gulp.src('app/views/styles/**/*.scss')
return gulp.src('app/styles/main.scss')
.pipe(sass().on('error', sass.logError))
.pipe(cssnano())
.pipe(gulp.dest('app/public/styles'));
});
gulp.task('start', function () {
nodemon({
script: 'server-dev.js',
ext: 'js html scss hbs',
env: { 'NODE_ENV': 'development' },
tasks: ['styles'],
ignore: [
'node_modules/'
],
})
.on('restart', function () {
console.log('Server restarted!')
})
})
gulp.task('watch', function() {
gulp.watch('app/styles/**/*.scss', ['styles']);
});
gulp.task('default', [], function() {
gulp.start('start');
});