-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
57 lines (48 loc) · 1.55 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
50
51
52
53
54
55
56
57
// Generated on 2015-07-13 using generator-firefox-extension 0.3.1
module.exports = function(grunt) {
'use strict';
require('load-grunt-tasks')(grunt);
// Configurable paths
var config = {
app: 'app',
dist: 'dist'
};
config.name = grunt.file.readJSON(config.app + '/package.json').name;
grunt.initConfig({
config: config,
shell: {
run: {
command: 'cfx run --pkgdir=<%= config.app %>'
},
xpi: {
command: [
'cfx xpi --pkgdir=<%= config.app %>',
'mv <%= config.name %>.xpi <%= config.dist %>',
'wget --post-file=<%= config.dist %>/<%= config.name %>.xpi http://localhost:8888/ || echo>/dev/null'
].join('&&')
}
},
watch: {
xpi: {
files: ['<%= config.app %>/**/*'],
tasks: ['shell:xpi']
}
},
wiredep: {
task: {
// Point to the files that should be updated when
// you run `grunt wiredep`
src: [
'app/data/{,*}/*.html'
],
options: {
// See wiredep's configuration documentation for the options
// you may pass:
// https://github.com/taptapship/wiredep#configuration
}
}
}
});
grunt.registerTask('run', ['shell:run']);
grunt.registerTask('default', ['run']);
};