forked from pathable/supermodel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
64 lines (54 loc) · 1.34 KB
/
Gruntfile.js
File metadata and controls
64 lines (54 loc) · 1.34 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
64
var exec = require('child_process').exec;
module.exports = function(grunt) {
grunt.initConfig({
qunit: {
supermodel: ['./test/index.html']
},
min: {
'supermodel.min.js': 'supermodel.js'
},
jshint: {
all: ['supermodel.js', './test/*.js'],
options: {
eqnull: true,
undef: true,
boss: true,
globals: {
// QUnit
ok: true,
test: true,
module: true,
raises: true,
deepEqual: true,
strictEqual: true,
// Dependencies
_: true,
jQuery: true,
exports: true,
require: true,
Backbone: true,
Supermodel: true
}
}
}
});
// Default tasks.
grunt.registerTask('default', ['jshint', 'qunit']);
// Release task, to be run only just before cutting a release in order to
// keep the commit log clean.
grunt.registerTask('release', 'default docco min');
// Build docco docs.
grunt.registerTask('docco', function() {
// Inform grunt when we're finished.
var done = this.async();
// Kick off docco and log results.
exec('docco supermodel.js', function(err, stdout, stderr) {
if (err) {
grunt.log.error(err);
return done(err.code);
}
grunt.log.write(stdout);
done();
});
});
};