forked from GradientStudios/aquajs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrunt.js
40 lines (34 loc) · 808 Bytes
/
grunt.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
module.exports = function(grunt) {
var spawn = require('child_process').spawn;
grunt.initConfig({
deps: {
'git.submodule': true
},
concat: {
'dist/aqua.js': '<config:lint.files>'
},
min: {
'dist/aqua.min.js': ['dist/aqua.js']
},
qunit: {
index: ['test/index.html']
},
test: {
files: ['test/tests/*.js']
},
lint: {
files: ['lib/base.js', 'lib/object.js']
}
});
grunt.registerTask('deps', 'download dependencies', function(data, name) {
var done = this.async();
spawn('git', ['submodule', 'init']).on('exit', function() {
spawn('git', ['submodule', 'update']).on('exit', function() {
grunt.log.writeln('git submodule updated.');
done();
});
});
});
// Default task.
grunt.registerTask('default', 'deps lint qunit concat min');
};