-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModfile.js
More file actions
28 lines (28 loc) · 675 Bytes
/
Modfile.js
File metadata and controls
28 lines (28 loc) · 675 Bytes
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
module.exports = {
tasks: {
replace: {
string: {
src: "foo.js",
dest: "dist/foo.js",
search: "TIMESTAMP",
replace: +new Date
},
regexp: {
src: "dist/foo.js",
search: /DEBUG/g,
replace: true
},
func: {
src: "dist/foo.js",
search: /v(\d+)/,
replace: function(match, v){
var v = Number(v);
return 'v' + ++v
}
}
}
},
targets: {
default: "replace"
}
};