-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgruntfile.js
54 lines (50 loc) · 1.37 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
50
51
52
53
54
module.exports = function(grunt) {
grunt.registerTask('size', 'Display file sizes.', function() {
var max = grunt.file.read('src/observable.js');
var min = grunt.file.read('observable.min.js');
console.log(require('maxmin')(max, min, true));
});
grunt.initConfig({
qunit: {
options: {
'--web-security': 'no',
coverage: {
src: ['src/**/*.js'],
instrumentedFiles: 'temp/',
lcovReport: 'report',
}
},
all: ['test/*.html']
},
coveralls: {
all: {
src: 'report/*.info'
},
},
closureCompiler: {
options: {
compilerFile: require('closure-compiler').JAR_PATH,
compilation_level: 'SIMPLE_OPTIMIZATIONS'
},
all: {
src: 'src/observable.js',
dest: 'observable.min.js'
}
},
docco: {
all: {
src: ['src/**/*.js'],
options: {
output: 'report/src-docco/'
}
}
}
});
grunt.loadNpmTasks('grunt-qunit-examples');
grunt.loadNpmTasks('grunt-coveralls');
grunt.loadNpmTasks('grunt-closure-tools');
grunt.loadNpmTasks('grunt-docco');
grunt.registerTask('default', ['closureCompiler', 'size', 'docco']);
grunt.registerTask('all', ['test', 'default', 'coveralls']);
grunt.registerTask('test', ['qunit']);
};