forked from unlhcc/HCCGo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
101 lines (101 loc) · 2.71 KB
/
Copy pathGruntfile.js
File metadata and controls
101 lines (101 loc) · 2.71 KB
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
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_electron_macos: {
command: 'cd HCCGo/ && npm run-script packageOsx'
},
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'
}
}
},
bower: {
install: {
options: {
targetDir: 'HCCGo/app/lib',
layout: 'byComponent',
install: true,
verbose: true,
cleanTargetDir: false
}
}
},
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-auto-install');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-bower-task');
grunt.loadNpmTasks('grunt-marked');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.registerTask('default', ['less',
'bower',
'auto_install']);
grunt.registerTask('run', ['less',
'bower',
'marked',
'auto_install',
'shell:start_electron']);
grunt.registerTask('packageWin', ['less',
'bower',
'marked',
'auto_install',
'shell:build_electron_windows']);
grunt.registerTask('packageOsx', ['less',
'bower',
'marked',
'auto_install',
'shell:build_electron_macos']);
grunt.registerTask('packageNix', ['less',
'bower',
'marked',
'auto_install',
'shell:build_electron_linux']);
grunt.registerTask('docs', ['jsdoc']);
};