forked from unsetbit/boilerplate-gulp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
34 lines (27 loc) · 730 Bytes
/
main.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
var bpcss = require('boilerplate-gulp-css'),
bpjs = require('boilerplate-gulp-js'),
gulp = require('gulp');
module.exports = function(gulp, config){
config = config || {};
var DEFAULTS = {
connect: {
root: ['./example', './build']
}
};
// Populate options with defaults if it doesn't contain them
Object.keys(DEFAULTS).forEach(function(key){
if(!(key in config)) config[key] = DEFAULTS[key];
});
gulp.task('bp:server', require('./lib/server')(gulp, config));
bpcss(gulp, config.css);
bpjs(gulp, config.js);
gulp.task('bp:build', gulp.parallel(
'bpjs:build',
'bpcss:build'
));
gulp.task('bp:dev', gulp.parallel(
'bpjs:dev',
'bpcss:dev',
'bp:server'
));
};