forked from zlailari/k2-chrome-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
35 lines (29 loc) · 833 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
'use strict';
var argv = require('minimist')(process.argv.slice(2));
var tasks = argv._;
var runSequence = require('run-sequence');
// Figure out if we want to watch our files for changes or not
// If the user ran a 'build' or 'package' task, then we do NOT want to watch them
var watchFiles = tasks.indexOf('build') === -1 && tasks.indexOf('package') === -1;
var gulp = require('./gulp')([
'browserify-events',
'browserify-content',
'eslint',
'sass',
'htmlcopy',
'imagecopy',
'manifestcopy',
'watch',
'zip'
], {
watchify: watchFiles,
uglify: false
});
gulp.task('build', [
'eslint', 'sass', 'htmlcopy', 'imagecopy', 'manifestcopy',
'browserify-content', 'browserify-events'
]);
gulp.task('default', ['build', 'watch']);
gulp.task('package', function () {
runSequence.use(gulp)('build', 'zip');
});