-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
85 lines (62 loc) · 1.79 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
84
85
module.exports = function(grunt) {
var customFtgConfig = {
app: 'Extension',
dist: 'dist'
};
// todo
//use customFTGconfig
//format file
// remove thumbs db
// should i use load or require
require('time-grunt')(grunt);
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-chrome-manifest');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.initConfig({
FtgConfig:customFtgConfig,
clean: ["dist"],
copy: {
main: {
files: [
// {src: ['Extension/*'], dest: 'dist/', filter: 'isFile'}, // includes files in path
// {src: ['Extension/**'], dest: 'dist/'}, // includes files in path and its subdirs
{expand: true, cwd: 'Extension/', src: ['**'], dest: 'dist/'}, // makes all src relative to cwd
// {expand: true, flatten: true, src: ['Extension/**'], dest: 'dist/', filter: 'isFile'} // flattens results to a single level
]
}
},chromeManifest: {
dist: {
options: {
buildnumber: true,
background: {
target: 'eventPage.js'
}
},
src: 'Extension',
dest: 'dist'
}
},
compress: {
dist: {
options: {
archive: 'package/FillTheGap.zip'
},
files: [{
expand: true,
cwd: 'dist/',
src: ['**'],
dest: ''
}]
}
}
});
// A very basic default task.
grunt.registerTask('logit', 'Log some stuff.', function() {
grunt.log.write('Logging some stuff...').ok();
});
grunt.registerTask('trial', ["compress:dist"]);
// quick
// full manifest/zip
grunt.registerTask('default', ["logit","clean","copy","chromeManifest:dist","compress:dist"]);
};