This repository has been archived by the owner on Aug 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Gruntfile.js
121 lines (118 loc) · 3.36 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
module.exports = function(grunt) {
var destinationFolder = './dist';
grunt.initConfig({
less: {
production: {
options: {
paths: ["HCCGo/app/css"]
},
files: {
"HCCGo/app/css/application.css": "HCCGo/app/css/application.less"
}
}
},
shell: {
start_electron: {
command: 'cd HCCGo/ && npm start'
},
build_electron_windows: {
command: 'cd HCCGo/ && npm run-script packageWin'
},
build_installer_windows: {
command: 'cd HCCGo/ && npm run-script installerWin'
},
build_electron_macos: {
command: 'cd HCCGo/ && npm run-script packageOsx'
},
build_installer_macos: {
command: 'cd HCCGo/ && npm run-script installerOsx'
},
build_electron_linux: {
command: 'cd HCCGo/ && npm run-script packageNix'
}
},
auto_install: {
subdir: {
options: {
cwd: 'HCCGo/',
stdout: true,
stderr: true,
failOnError: true,
npm: '--development'
}
}
},
marked: {
dist: {
files: {
'HCCGo/app/html/beta_notice.html': 'HCCGo/app/markdown/beta_notice.md',
'HCCGo/app/html/tutorial_help.html': 'HCCGo/app/markdown/tutorial_help.md'
}
}
},
bowerInstall: {
target: {
// Point to the files that should be updated when
// you run `grunt bower-install`
src: [
'HCCGo/**/*.html', // .html support...
'HCCGo/index.html', // .jade support...
'HCCGo/app/css/application.less' // .scss & .sass support...
],
// Optional:
// ---------
cwd: '',
dependencies: true,
devDependencies: false,
exclude: [],
fileTypes: {},
ignorePath: '',
overrides: {}
}
},
jsdoc: {
dist: {
src: ['HCCGo/app/js'],
options: {
destination: 'docs',
configure: 'jsdoc.json',
template: './node_modules/minami',
tutorials: './dev-tutorials',
readme: './README.md'
}
}
}
});
grunt.loadNpmTasks('grunt-bower-install');
grunt.loadNpmTasks('grunt-auto-install');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-marked');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.registerTask('default', ['less',
'bowerInstall',
'auto_install']);
grunt.registerTask('run', ['less',
'bowerInstall',
'marked',
'auto_install',
'shell:start_electron']);
grunt.registerTask('packageWin', ['less',
'bowerInstall',
'marked',
'auto_install',
'shell:build_electron_windows',
'shell:build_installer_windows']);
grunt.registerTask('packageOsx', ['less',
'bowerInstall',
'marked',
'auto_install',
'shell:build_electron_macos',
'shell:build_installer_macos']);
grunt.registerTask('packageNix', ['less',
'bowerInstall',
'marked',
'auto_install',
'shell:build_electron_linux']);
grunt.registerTask('docs', ['jsdoc']);
};