-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.js
49 lines (38 loc) · 1.21 KB
/
Gruntfile.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
47
48
49
/*globals
module
*/
(function () {
"use strict";
if (module === undefined) {
return;
}
module.exports = function (grunt) {
// Execute QUnit unit tests
grunt.loadNpmTasks('grunt-contrib-qunit');
// Minify files with Google Closure Compiler
grunt.loadNpmTasks('grunt-closure-compiler');
grunt.initConfig({
'closure-compiler': {
frontend: {
closurePath: '.',
js: 'maoli.js',
jsOutputFile: 'maoli.min.js',
maxBuffer: 500,
options: {
compilation_level: 'SIMPLE_OPTIMIZATIONS',
language_in: 'ECMASCRIPT5_STRICT',
create_source_map: 'maoli.min.map',
source_map_format: 'V3'
}
}
},
qunit: {
source: ["test/test.html"],
minified: ["test/test-min.html"]
}
});
grunt.registerTask("minify", "closure-compiler");
grunt.registerTask("test", "qunit");
grunt.registerTask("default", ["minify", "test"]);
};
}());