-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGruntfile.js
49 lines (41 loc) · 1.24 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
// Generated on 2015-06-08 using generator-firefox-extension 0.3.1
module.exports = function(grunt) {
'use strict';
require('load-grunt-tasks')(grunt);
grunt.loadNpmTasks('grunt-jpm');
// Configurable paths
var config = {
app: 'app',
dist: 'dist'
};
config.name = grunt.file.readJSON(config.app + '/package.json').id;
config.version = grunt.file.readJSON(config.app + '/package.json').version;
grunt.initConfig({
config: config,
shell: {
serveXpi: {
command: 'jpm run <%= config.dist %>'
},
serveProject: {
command: [
'cd <%= config.app %>',
'jpm run . -b /usr/bin/firefox'
].join('&&')
}
},
jpm: {
options: {
src: "./<%= config.app %>/",
xpi: "./<%= config.dist %>/"
}
},
watch: {
xpi: {
files: ['<%= config.app %>/**/*'],
tasks: ['shell:jpm', 'shell:serveProject']
}
}
});
grunt.registerTask('run', ['shell:serveProject']);
grunt.registerTask('default', ['jpm:xpi', 'shell:serveProject']);
};