-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
47 lines (40 loc) · 1.02 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
46
47
var gulp = require('gulp');
var sass = require('gulp-sass');
var server = require('gulp-develop-server');
var paths = {
styles: {
src: './public/sass',
files: './public/sass/**/*.scss',
dest: './public/css'
},
serverJS: {
files: ['**/*.js', '!node_modules/**', '!bin/**']
},
scripts: {
start: 'bin/www'
}
};
gulp.task('server:start', function() {
server.listen({path: paths.scripts.start}, function(error) {
console.log(error);
});
});
gulp.task('server:restart', function() {
server.restart();
});
gulp.task('default', ['server:start', 'sass'], function() {
gulp.watch(paths.serverJS.files, ['server:restart']);
gulp.watch(paths.styles.files, ['sass']);
});
gulp.task('sass', function() {
gulp.src(paths.styles.files)
.pipe(sass({
outputStyle: 'compressed',
sourceComments: 'map',
includePaths: [paths.styles.src]
}))
.pipe(gulp.dest(paths.styles.dest));
});
gulp.task('build', ['sass'], function() {
// Currently the only thing to do is compile SASS.
});