1
- // Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %>
1
+ // Generated on <%% = (new Date).toISOString().split('T')[0] %> using <%% = pkg.name %> <% %= pkg.version %>
2
2
'use strict' ;
3
3
4
4
// # Globbing
@@ -22,8 +22,7 @@ module.exports = function (grunt) {
22
22
yeoman : {
23
23
// configurable paths
24
24
app : require ( './bower.json' ) . appPath || 'app' ,
25
- dist : 'public' ,
26
- views : 'views'
25
+ dist : 'dist'
27
26
} ,
28
27
express : {
29
28
options : {
@@ -37,7 +36,7 @@ module.exports = function (grunt) {
37
36
} ,
38
37
prod : {
39
38
options : {
40
- script : 'server.js' ,
39
+ script : 'dist/ server.js' ,
41
40
node_env : 'production'
42
41
}
43
42
}
@@ -80,7 +79,7 @@ module.exports = function (grunt) {
80
79
} ,
81
80
livereload : {
82
81
files : [
83
- '<%%= yeoman.app %>/<%%= yeoman. views %> /{,*//*}*.{html,jade}' ,
82
+ '<%%= yeoman.app %>/views/{,*//*}*.{html,jade}' ,
84
83
'{.tmp,<%%= yeoman.app %>}/styles/{,*//*}*.css' ,
85
84
'{.tmp,<%%= yeoman.app %>}/scripts/{,*//*}*.js' ,
86
85
'<%%= yeoman.app %>/images/{,*//*}*.{png,jpg,jpeg,gif,webp,svg}' ,
@@ -133,9 +132,9 @@ module.exports = function (grunt) {
133
132
dot : true ,
134
133
src : [
135
134
'.tmp' ,
136
- '<%%= yeoman.views %>/*' ,
137
- '<%%= yeoman.dist %>/*' ,
138
- '!<%%= yeoman.dist %>/.git*'
135
+ '<%%= yeoman.dist %>/views /*' ,
136
+ '<%%= yeoman.dist %>/public/ *' ,
137
+ '!<%%= yeoman.dist %>/public/ .git*' ,
139
138
]
140
139
} ]
141
140
} ,
@@ -174,8 +173,8 @@ module.exports = function (grunt) {
174
173
html : '<%%= yeoman.app %>/views/index.html' , < % } % >
175
174
ignorePath: '< % %= yeoman . app % > /'
176
175
}
177
- } ,
178
- < % if ( coffee ) { % >
176
+ } , < % if ( coffee ) { % >
177
+
179
178
// Compiles CoffeeScript to JavaScript
180
179
coffee: {
181
180
options : {
@@ -200,8 +199,8 @@ module.exports = function (grunt) {
200
199
ext : '.js'
201
200
} ]
202
201
}
203
- } ,< % } % >
204
- < % if ( compass ) { % >
202
+ } ,< % } % > < % if ( compass ) { % >
203
+
205
204
// Compiles Sass to CSS and generates necessary files if requested
206
205
compass: {
207
206
options : {
@@ -221,7 +220,7 @@ module.exports = function (grunt) {
221
220
} ,
222
221
dist : {
223
222
options : {
224
- generatedImagesDir : '<%%= yeoman.dist %>/images/generated'
223
+ generatedImagesDir : '<%%= yeoman.dist %>/public/ images/generated'
225
224
}
226
225
} ,
227
226
server : {
@@ -236,10 +235,10 @@ module.exports = function (grunt) {
236
235
dist : {
237
236
files : {
238
237
src : [
239
- '<%%= yeoman.dist %>/scripts/{,*/}*.js' ,
240
- '<%%= yeoman.dist %>/styles/{,*/}*.css' ,
241
- '<%%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}' ,
242
- '<%%= yeoman.dist %>/styles/fonts/*'
238
+ '<%%= yeoman.dist %>/public/ scripts/{,*/}*.js' ,
239
+ '<%%= yeoman.dist %>/public/ styles/{,*/}*.css' ,
240
+ '<%%= yeoman.dist %>/public/ images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}' ,
241
+ '<%%= yeoman.dist %>/public/ styles/fonts/*'
243
242
]
244
243
}
245
244
}
@@ -249,20 +248,20 @@ module.exports = function (grunt) {
249
248
// concat, minify and revision files. Creates configurations in memory so
250
249
// additional tasks can operate on them
251
250
useminPrepare: {
252
- html : [ '<%%= yeoman.app %>/<%%= yeoman. views %> /index.html' ,
253
- '<%%= yeoman.app %>/<%%= yeoman. views %> /index.jade' ] ,
251
+ html : [ '<%%= yeoman.app %>/views/index.html' ,
252
+ '<%%= yeoman.app %>/views/index.jade' ] ,
254
253
options : {
255
- dest : '<%%= yeoman.dist %>'
254
+ dest : '<%%= yeoman.dist %>/public '
256
255
}
257
256
} ,
258
257
259
258
// Performs rewrites based on rev and the useminPrepare configuration
260
259
usemin: {
261
- html : [ '<%%= yeoman.views %>/{,*/}*.html' ,
262
- '<%%= yeoman.views %>/{,*/}*.jade' ] ,
260
+ html : [ '<%%= yeoman.dist %>/views /{,*/}*.html' ,
261
+ '<%%= yeoman.dist %>/views /{,*/}*.jade' ] ,
263
262
css : [ '<%%= yeoman.dist %>/styles/{,*/}*.css' ] ,
264
263
options : {
265
- assetsDirs : [ '<%%= yeoman.dist %>' ]
264
+ assetsDirs : [ '<%%= yeoman.dist %>/public ' ]
266
265
}
267
266
} ,
268
267
@@ -273,20 +272,22 @@ module.exports = function (grunt) {
273
272
expand : true ,
274
273
cwd : '<%%= yeoman.app %>/images' ,
275
274
src : '{,*/}*.{png,jpg,jpeg,gif}' ,
276
- dest : '<%%= yeoman.dist %>/images'
275
+ dest : '<%%= yeoman.dist %>/public/ images'
277
276
} ]
278
277
}
279
278
} ,
279
+
280
280
svgmin: {
281
281
dist : {
282
282
files : [ {
283
283
expand : true ,
284
284
cwd : '<%%= yeoman.app %>/images' ,
285
285
src : '{,*/}*.svg' ,
286
- dest : '<%%= yeoman.dist %>/images'
286
+ dest : '<%%= yeoman.dist %>/public/ images'
287
287
} ]
288
288
}
289
289
} ,
290
+
290
291
htmlmin: {
291
292
dist : {
292
293
options : {
@@ -297,9 +298,9 @@ module.exports = function (grunt) {
297
298
} ,
298
299
files : [ {
299
300
expand : true ,
300
- cwd : '<%%= yeoman.app %>/<%%= yeoman. views %> ' ,
301
+ cwd : '<%%= yeoman.app %>/views' ,
301
302
src : [ '*.html' , 'partials/*.html' ] ,
302
- dest : '<%%= yeoman.views %>'
303
+ dest : '<%%= yeoman.dist %>/views '
303
304
} ]
304
305
}
305
306
} ,
@@ -320,7 +321,7 @@ module.exports = function (grunt) {
320
321
// Replace Google CDN references
321
322
cdnify: {
322
323
dist : {
323
- html : [ '<%%= yeoman.views %>/*.html' ]
324
+ html : [ '<%%= yeoman.dist %>/views /*.html' ]
324
325
}
325
326
} ,
326
327
@@ -331,7 +332,7 @@ module.exports = function (grunt) {
331
332
expand : true ,
332
333
dot : true ,
333
334
cwd : '<%%= yeoman.app %>' ,
334
- dest : '<%%= yeoman.dist %>' ,
335
+ dest : '<%%= yeoman.dist %>/public ' ,
335
336
src : [
336
337
'*.{ico,png,txt}' ,
337
338
'.htaccess' ,
@@ -342,28 +343,17 @@ module.exports = function (grunt) {
342
343
} , {
343
344
expand : true ,
344
345
dot : true ,
345
- cwd : '<%%= yeoman.app %>/<%%= yeoman. views %> ' ,
346
- dest : '<%%= yeoman.views %>' ,
347
- src : '**/*.jade' ,
346
+ cwd : '<%%= yeoman.app %>/views' ,
347
+ dest : '<%%= yeoman.dist %>/views ' ,
348
+ src : '**/*.jade'
348
349
} , {
349
350
expand : true ,
350
351
cwd : '.tmp/images' ,
351
- dest : '<%%= yeoman.dist %>/images' ,
352
+ dest : '<%%= yeoman.dist %>/public/ images' ,
352
353
src : [ 'generated/*' ]
353
- } ]
354
- } ,
355
- heroku : {
356
- files : [ {
357
- expand : true ,
358
- dot : true ,
359
- dest : 'heroku' ,
360
- src : [
361
- '<%%= yeoman.dist %>/**' ,
362
- '<%%= yeoman.views %>/**'
363
- ]
364
354
} , {
365
355
expand : true ,
366
- dest : 'heroku ' ,
356
+ dest : '<%%= yeoman.dist %> ' ,
367
357
src : [
368
358
'package.json' ,
369
359
'server.js' ,
@@ -484,11 +474,10 @@ module.exports = function (grunt) {
484
474
'usemin'
485
475
]);
486
476
487
- grunt.registerTask('heroku', [
488
- 'build',
489
- 'clean:heroku',
490
- 'copy:heroku'
491
- ]);
477
+ grunt.registerTask('heroku', function () {
478
+ grunt . log . warn ( 'The `heroku` task has been deprecated. Use `grunt build` to build for deployment.' ) ;
479
+ grunt . task . run ( [ 'build' ] ) ;
480
+ } );
492
481
493
482
grunt.registerTask('default', [
494
483
'newer:jshint',
0 commit comments