forked from PeterOdeus/dogeparty-wallet
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.js
82 lines (75 loc) · 2.5 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
module.exports = function (grunt) {
var buildDir = 'build/';
var config = {
pkg: grunt.file.readJSON('package.json'),
build: {
options: {
buildDir: buildDir,
srcDir: 'src/',
assetsHome: 'assets/',
checkDeps: true,
depsDir: 'vendors/',
/*cdn: {
hosts: {
'css': ['https://css1.counterwallet.dev', 'https://css2.counterwallet.dev'],
'js': ['https://js1.counterwallet.dev', 'https://js2.counterwallet.dev'],
'assets': ['https://assets1.counterwallet.dev', 'https://assets2.counterwallet.dev']
}
}*/
},
ejs: {
html: {
options: require("./options"),
src: ["src/**/*.html.ejs"],
dest: ".",
expand: true,
ext: ".html"
},
js: {
options: require("./options"),
src: ["src/**/*.js.ejs"],
dest: ".",
expand: true,
ext: ".js"
}
},
process: {
files: [
{cwd: 'src/', src: 'index.html', dest: buildDir, expand: true},
{cwd: 'src/pages/', src: '*.html', dest: buildDir+'pages/', expand: true}
]
},
copy: {
files: [
{src: 'src/robots.txt', dest: buildDir+'robots.txt'},
{cwd: 'src/assets/', src: '*', dest: buildDir+'assets/', expand: true}
]
}
},
watch: {
ejs: {
files: ["src/**/*.ejs", "options.json"],
tasks: ["build:ejs"]
}
}
}
/*config['chrome-extension'] = {
options: {
name: "counterwallet",
version: pkg.version,
id: "00000000000000000000000000000000",
//updateUrl: "http://example.com/extension/111111/",
chrome: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
clean: true,
certDir: '.',
buildDir: '.',
resources: [
"build/**"
]
}
}*/
grunt.initConfig(config);
grunt.loadTasks('grunt-tasks');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['build']);
};