-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
38 lines (34 loc) · 981 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
manifest: grunt.file.readJSON('extension/manifest.json'),
jshint: {
files: ['extension/*.js'],
options: {
jshintrc: true
}
},
jasmine: {
src: ['extension/*.js'],
options: {
specs: 'tests/spec/*.spec.js',
helpers: 'tests/spec/*.helper.js'
}
},
run: {
crxmake: {
exec: [
'./crxmake.sh extension/ cert/key.pem',
'mv extension.crx dist/<%= pkg.name %>-<%= manifest.version %>.crx'
].join(' && ')
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-run');
grunt.registerTask('default', ['jshint', 'jasmine']);
grunt.registerTask('test', ['jshint', 'jasmine']);
grunt.registerTask('build', ['jshint', 'jasmine', 'run:crxmake']);
};