forked from emberjs/ember-inspector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
83 lines (78 loc) · 1.96 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
module.exports = function(grunt) {
var packageJson = grunt.file.readJSON('package.json');
var versionedPane = 'panes-' + packageJson.emberVersionsSupported[0].replace(/\./g, '-');
var config = {
pkg: packageJson,
env: process.env,
"jpm": {
options: {
src: "dist/firefox",
xpi: "tmp/xpi"
}
},
"s3": {
options: {
bucket: 'ember-extension',
access: 'public-read',
headers: {
// One day cache policy (1000 * 60 * 60 * 24)
"Cache-Control": "max-age=86400000, public"
}
},
bookmarklet: {
sync: [{
src: 'dist/bookmarklet/**/*.*',
dest: 'dist_bookmarklet/',
rel: 'dist/bookmarklet',
options: { verify: true }
}]
}
},
"compress": {
main: {
options: {
archive: 'dist/chrome/ember-inspector.zip'
},
expand: true,
pretty: true,
src: 'dist/chrome/**/*'
},
"chrome-pane": {
options: {
archive: 'dist/chrome-pane.zip'
},
expand: true,
pretty: true,
cwd: 'dist/chrome/' + versionedPane,
src: ['**/*']
},
"firefox-pane": {
options: {
archive: 'dist/firefox-pane.zip'
},
expand: true,
pretty: true,
cwd: 'dist/firefox/data/' + versionedPane,
src: ['**/*']
},
"bookmarklet-pane": {
options: {
archive: 'dist/bookmarklet-pane.zip'
},
expand: true,
pretty: true,
cwd: 'dist/bookmarklet/' + versionedPane,
src: ['**/*']
}
}
};
grunt.initConfig(config);
grunt.loadNpmTasks('grunt-jpm');
grunt.loadNpmTasks('grunt-s3');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.registerTask('build-xpi', ['jpm:xpi']);
grunt.registerTask('run-xpi', ['jpm:run']);
grunt.registerTask('clean-tmp', function() {
grunt.file.delete('./tmp');
});
};