-
Notifications
You must be signed in to change notification settings - Fork 3
/
Gruntfile.js
48 lines (45 loc) · 1020 Bytes
/
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
module.exports = function( grunt ) {
'use strict';
grunt.initConfig({
uglify: {
all: {
files: {
"dist/dwarf.min.js": [ "src/dwarf.js" ]
},
options: {
preserveComments: false,
sourceMap: "dist/dwarf.min.map",
sourceMappingURL: "dwarf.min.map",
report: "gzip",
beautify: {
ascii_only: true
},
banner: "/*! webkit-dwarf Copyright(c) 2013 Daniel Yang <[email protected]> MIT Licensed */",
compress: {
hoist_funs: false,
loops: false,
unused: false
}
}
}
},
copy: {
test: {
files: [
{expand: true, cwd: 'src/', src: ['*'], dest: 'test/js/'}
]
}
},
mocha_phantomjs: {
options: {
'reporter': 'xunit',
'output': 'tests/results/result.xml'
},
all: ['test/*.html']
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-mocha-phantomjs');
grunt.registerTask('default', ['uglify', 'copy', 'mocha_phantomjs']);
};