-
Notifications
You must be signed in to change notification settings - Fork 2
/
make.js
executable file
·46 lines (43 loc) · 870 Bytes
/
make.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
// name of the library
global.library = 'VanillaCaret'
var command = process.argv[2],
utils = require('./tasks/_utils'),
eslint = require('./tasks/eslint'),
test = require('./tasks/test'),
minify = require('./tasks/minify'),
build = require('./tasks/build'),
watch = require('./tasks/watch'),
serve = require('./tasks/serve')
/**
* Each task required (except watch) returns a promise so you will be able to chain them as you prefer
*/
switch (command) {
case 'serve':
serve()
break
case 'eslint':
case 'lint':
eslint()
break
case 'build':
build()
break
case 'watch':
watch()
break
case 'minify':
case 'min':
minify()
break
case 'test':
test()
break
default:
eslint()
.then(build)
.then(minify)
.then(test)
.then(function() {
utils.print('Project successfully compiled!', 'confirm')
})
}