forked from toggl/track-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
46 lines (42 loc) · 973 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
module.exports = function( grunt ) {
'use strict';
grunt.loadNpmTasks('grunt-jslint');
grunt.loadNpmTasks('grunt-crx');
grunt.loadNpmTasks('grunt-contrib-compress');
var config = {
app: 'src',
dist: 'dist',
package: grunt.file.readJSON('package.json')
};
grunt.initConfig({
config: config,
jslint: {
app: {
src: [
'<%= config.app %>/scripts/**/*.js'
]
}
},
crx: {
toggl: {
"src": "<%= config.app %>",
"dest": "<%= config.dist %>",
"privateKey": "toggl-button.pem"
}
},
compress: {
dist: {
options: {
archive: '<%= config.dist %>/<%= config.package.name %>-<%= config.package.version %>.zip'
},
files: [{
expand: true,
cwd: '<%= config.app %>/',
src: ['**'],
dest: ''
}]
}
}
});
grunt.registerTask('default', ['jslint', 'crx', 'compress']);
};