-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.js
More file actions
63 lines (53 loc) · 1 KB
/
Copy pathproject.js
File metadata and controls
63 lines (53 loc) · 1 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**
* Example project for Brigadier.
$ brigadier project
$ brigadier project debug
*/
task('default', (config) => {
run('clean');
run('setup');
run('compile');
run('test');
run('package');
run('deploy', {
username: config.username,
password: config.password
});
});
task('debug', () => {
run('clean');
run('setup');
run('compile', {debug: true});
run('test', {all: true});
});
task('clean', () => {
rmdir('tmp');
});
task('setup', () => {
mkdir('tmp');
});
task('compile', (config) => {
ran('setup') ||
run('setup');
each([
'path/to/file1',
'path/to/file2'
], (path) => {
project.config.debug || config.debug ?
exec('compiler --debug ' + path + ' tmp') :
exec('compiler ' + path + ' tmp');
});
});
task('test', (config) => {
ran('compile') ||
run('compile');
exec('tester tests/common');
config.all &&
exec('tester tests/special');
});
task('package', () => {
exec('packager tmp package.pkg');
});
task('deploy', (config) => {
// config.username, config.password
});