-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
30 lines (26 loc) · 984 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
module.exports = function (grunt) {
require('google-closure-compiler').grunt(grunt);
grunt.loadNpmTasks('grunt-zip');
grunt.initConfig({
'closure-compiler': {
my_target: {
files: {
'chrome/content/all.min.js': ['src/**/*.js']
},
options: {
compilation_level: 'WHITESPACE_ONLY', //should be 'SIMPLE', // should be 'ADVANCED'
language_in: 'ECMASCRIPT5_STRICT',
language_out: 'ECMASCRIPT5_STRICT',
warning_level: 'VERBOSE',
create_source_map: 'chrome/content/all.min.js.map',
}
}
},
'zip': {
'build/addon.xpi': ['chrome/**', 'defaults/**', 'locale/**', 'skin/**', 'chrome.manifest', 'install.rdf']
}
});
// Default task(s).
grunt.registerTask('build', ['closure-compiler', 'zip']);
grunt.registerTask('default', ['build']);
};