forked from honestbleeps/Reddit-Enhancement-Suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
49 lines (44 loc) · 1.35 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
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Move CSS & JS
copy: {
chrome: {
files: [{ expand: true, cwd: 'lib/', src: ['**'], dest: 'Chrome/'}]
},
operablink: {
files: [{ expand: true, cwd: 'lib/', src: ['**'], dest: 'OperaBlink/'}]
},
safari: {
files: [{ expand: true, cwd: 'lib/', src: ['**'], dest: 'RES.safariextension/'}]
},
firefox: {
files: [{ expand: true, cwd: 'lib/', src: ['**'], dest: 'XPI/'}]
}
},
// Watch for changes
watch: {
chrome: {
files: ['lib/*', 'lib/*/*'], tasks: ['copy:chrome']
},
operablink: {
files: ['lib/*', 'lib/*/*'], tasks: ['copy:operablink']
},
safari: {
files: ['lib/*', 'lib/*/*'], tasks: ['copy:safari']
},
firefox: {
files: ['lib/*', 'lib/*/*'], tasks: ['copy:firefox']
}
}
});
// Build all with "grunt"
grunt.registerTask('default', ['copy']);
// Setup for devlopment with "grunt chrome" or "grunt firefox" (enables watch task)
grunt.registerTask('chrome', ['copy:chrome', 'watch:chrome']);
grunt.registerTask('operablink', ['copy:operablink', 'watch:operablink']);
grunt.registerTask('safari', ['copy:safari', 'watch:safari']);
grunt.registerTask('firefox', ['copy:firefox', 'watch:firefox']);
};