-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathgulpfile.js
24 lines (21 loc) · 867 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
var path = require('path'),
gulp = require('gulp'),
methods = require('./build/base');
gulp.task('style', methods.style);
gulp.task('script', methods.script);
gulp.task('clean', methods.clean);
gulp.task('html', methods.html);
gulp.task('assets', methods.assets);
gulp.task('default', ['clean'],
function() {
process.env.NODE_ENV = 'development'
gulp.run('style', 'script', 'assets', 'html');
gulp.watch([path.join(__dirname, 'src/**/*.scss'), path.join(__dirname, 'src/**/*.sass')], o => gulp.run('style'));
gulp.watch(path.join(__dirname, 'src/**/*.js'), o => gulp.run('script'));
gulp.watch(path.join(__dirname, 'src/**/*.html'), o => gulp.run('html'));
methods.server();
})
gulp.task('pack', function() {
process.env.NODE_ENV = 'product';
gulp.run('style', 'script', 'assets', 'html');
})