-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
257 lines (238 loc) · 5.15 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
/**
* NRdev
*
* @category Deployment
* @subcategory Taskmanger
* @package NRdev
* @author André Lademann <andre.lademann@netresearch.de>
* @license https://netresearch.de/license
* @version 0.2.0
*/
'use strict';
module.exports = function (grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.loadNpmTasks('grunt-readme-generator');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
compile: {
cssmin: {
css: {
src: 'www/css/main.css',
dest: 'www/css/main.min.css'
}
},
compass: {
dist: {
options: {
sassDir: 'scss',
cssDir: 'www/css',
environment: 'production'
}
},
dev: {
options: {
sassDir: 'scss',
cssDir: 'www/css'
}
}
},
uglify: {
js: {
files: {
'www/js/nrdev.js': ['www/js/app.js', 'www/js/config.js', 'www/js/controllers.js']
}
}
}
},
connect: {
server: {
options: {
port: 9001,
base: 'www',
keepalive: true
}
},
preview: {
options: {
port: 9002,
base: 'www',
keepalive: true
}
},
reports: {
options: {
port: 9003,
base: 'report/dalek',
keepalive: true
}
}
},
notify: {
watch: {
options: {
title: 'Task Complete', // optional
message: 'SASS and Uglify finished running' //required
}
},
server: {
options: {
message: 'Server is ready!'
}
}
},
readme_generator: {
nr: {
options: {
readme_folder: 'docs',
output: 'README.md',
table_of_contents: true,
toc_extra_links: [],
generate_changelog: false,
has_travis: true,
github_username: 'vergissberlin',
travis_branch: 'develop',
generate_footer: true,
generate_title: true,
package_title: 'NR[dev] - Cross platform application',
package_name: 'nr-dev',
package_desc: 'The is a cross application for mobile devices. Created by and for developers of Netresearch GmbH & Co.KG. The app includes experiments with various API´s. Manage colors of lamps in the office, games from noise, let you list parts of the internal address book. It is based on Ionic (http://ionicframework.com) base project. A special thanks goes to the developers of this project.',
informative: true,
h1: '#',
h2: '##',
back_to_top_custom: null
},
order: {
'roadmap.md': 'Roadmap',
'ideas.md': 'Ideas',
'implementation.md': 'Implementation and Requirements',
'contribute.md': 'Contribute'
}
}
},
shell: {
dalekjs: {
options: {
stdout: true,
failOnError: true
},
command: 'dalek tests/integration/*.js'
},
dalekjsAdvanced: {
options: {
stdout: true,
failOnError: true
},
command: 'dalek tests/advanced/*.js'
},
dalekjsCoffee: {
options: {
stdout: true,
failOnError: true
},
command: 'dalek tests/integration/*.coffee'
},
dalekjsMultiple: {
options: {
stdout: true,
failOnError: true
},
command: 'dalek tests/integration/*.js -b phantomjs,chrome -r console,html'
},
dalekjsChrome: {
options: {
stdout: true,
failOnError: true
},
command: 'dalek tests/integration/*.js -b chrome'
},
dalekjsHtmlreport: {
options: {
stdout: true,
failOnError: true
},
command: 'dalek tests/integration/*.js -r console,html'
},
dalekjsFirefox: {
options: {
stdout: true,
failOnError: true
},
command: 'dalek tests/integration/*.js -b firefox'
}
},
watch: {
css: {
files: 'scss/**/*.scss',
tasks: ['compass'],
options: {
livereload: false
}
},
scripts: {
files: ['www/js/**/*.js'],
tasks: ['uglify'],
options: {
spawn: false
}
},
tests: {
files: [
'tests/**/*.js',
'www/templates/**/*.html',
'www/js/**/*.js'
],
tasks: ['shell:dalekjs']
}
}
});
grunt.registerTask('server', [
'connect:server'
]);
grunt.registerTask('preview', [
'connect:preview'
]);
grunt.registerTask('reports', [
'connect:reports'
]);
grunt.registerTask('dalek', [
'watch',
'shell:dalekjs'
]);
grunt.registerTask('dalek_advanced', [
'connect:server',
'shell:dalekjsAdvanced'
]);
grunt.registerTask('dalek_coffee', [
'connect:server',
'shell:dalekjsCoffee'
]);
grunt.registerTask('dalek_htmlreport', [
'connect:server',
'shell:dalekjsHtmlreport'
]);
grunt.registerTask('dalek_chrome', [
'connect:server',
'shell:dalekjsChrome',
'notify:watch'
]);
grunt.registerTask('dalek_firefox', [
'connect:server',
'shell:dalekjsFirefox'
]);
grunt.registerTask('dalek_multiple', [
'connect:server',
'shell:dalekjsMultiple'
]);
grunt.registerTask('scss', [
'sass',
'cssmin',
'notify:watch'
]);
// this would be run by typing "grunt test" on the command line
grunt.registerTask('readme', ['readme_generator']);
// this would be run by typing "grunt test" on the command line
grunt.registerTask('test', ['dalek']);
// the default task can be run just by typing "grunt" on the command line
grunt.registerTask('default', ['watch']);
};