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 %>
22'use strict' ;
33
44// # Globbing
@@ -22,8 +22,7 @@ module.exports = function (grunt) {
2222 yeoman : {
2323 // configurable paths
2424 app : require ( './bower.json' ) . appPath || 'app' ,
25- dist : 'public' ,
26- views : 'views'
25+ dist : 'dist'
2726 } ,
2827 express : {
2928 options : {
@@ -37,7 +36,7 @@ module.exports = function (grunt) {
3736 } ,
3837 prod : {
3938 options : {
40- script : 'server.js' ,
39+ script : 'dist/ server.js' ,
4140 node_env : 'production'
4241 }
4342 }
@@ -80,7 +79,7 @@ module.exports = function (grunt) {
8079 } ,
8180 livereload : {
8281 files : [
83- '<%%= yeoman.app %>/<%%= yeoman. views %> /{,*//*}*.{html,jade}' ,
82+ '<%%= yeoman.app %>/views/{,*//*}*.{html,jade}' ,
8483 '{.tmp,<%%= yeoman.app %>}/styles/{,*//*}*.css' ,
8584 '{.tmp,<%%= yeoman.app %>}/scripts/{,*//*}*.js' ,
8685 '<%%= yeoman.app %>/images/{,*//*}*.{png,jpg,jpeg,gif,webp,svg}' ,
@@ -133,9 +132,9 @@ module.exports = function (grunt) {
133132 dot : true ,
134133 src : [
135134 '.tmp' ,
136- '<%%= yeoman.views %>/*' ,
137- '<%%= yeoman.dist %>/*' ,
138- '!<%%= yeoman.dist %>/.git*'
135+ '<%%= yeoman.dist %>/views /*' ,
136+ '<%%= yeoman.dist %>/public/ *' ,
137+ '!<%%= yeoman.dist %>/public/ .git*' ,
139138 ]
140139 } ]
141140 } ,
@@ -174,8 +173,8 @@ module.exports = function (grunt) {
174173 html : '<%%= yeoman.app %>/views/index.html' , < % } % >
175174 ignorePath: '< % %= yeoman . app % > /'
176175 }
177- } ,
178- < % if ( coffee ) { % >
176+ } , < % if ( coffee ) { % >
177+
179178 // Compiles CoffeeScript to JavaScript
180179 coffee: {
181180 options : {
@@ -200,8 +199,8 @@ module.exports = function (grunt) {
200199 ext : '.js'
201200 } ]
202201 }
203- } ,< % } % >
204- < % if ( compass ) { % >
202+ } ,< % } % > < % if ( compass ) { % >
203+
205204 // Compiles Sass to CSS and generates necessary files if requested
206205 compass: {
207206 options : {
@@ -221,7 +220,7 @@ module.exports = function (grunt) {
221220 } ,
222221 dist : {
223222 options : {
224- generatedImagesDir : '<%%= yeoman.dist %>/images/generated'
223+ generatedImagesDir : '<%%= yeoman.dist %>/public/ images/generated'
225224 }
226225 } ,
227226 server : {
@@ -236,10 +235,10 @@ module.exports = function (grunt) {
236235 dist : {
237236 files : {
238237 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/*'
243242 ]
244243 }
245244 }
@@ -249,20 +248,20 @@ module.exports = function (grunt) {
249248 // concat, minify and revision files. Creates configurations in memory so
250249 // additional tasks can operate on them
251250 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' ] ,
254253 options : {
255- dest : '<%%= yeoman.dist %>'
254+ dest : '<%%= yeoman.dist %>/public '
256255 }
257256 } ,
258257
259258 // Performs rewrites based on rev and the useminPrepare configuration
260259 usemin: {
261- html : [ '<%%= yeoman.views %>/{,*/}*.html' ,
262- '<%%= yeoman.views %>/{,*/}*.jade' ] ,
260+ html : [ '<%%= yeoman.dist %>/views /{,*/}*.html' ,
261+ '<%%= yeoman.dist %>/views /{,*/}*.jade' ] ,
263262 css : [ '<%%= yeoman.dist %>/styles/{,*/}*.css' ] ,
264263 options : {
265- assetsDirs : [ '<%%= yeoman.dist %>' ]
264+ assetsDirs : [ '<%%= yeoman.dist %>/public ' ]
266265 }
267266 } ,
268267
@@ -273,20 +272,22 @@ module.exports = function (grunt) {
273272 expand : true ,
274273 cwd : '<%%= yeoman.app %>/images' ,
275274 src : '{,*/}*.{png,jpg,jpeg,gif}' ,
276- dest : '<%%= yeoman.dist %>/images'
275+ dest : '<%%= yeoman.dist %>/public/ images'
277276 } ]
278277 }
279278 } ,
279+
280280 svgmin: {
281281 dist : {
282282 files : [ {
283283 expand : true ,
284284 cwd : '<%%= yeoman.app %>/images' ,
285285 src : '{,*/}*.svg' ,
286- dest : '<%%= yeoman.dist %>/images'
286+ dest : '<%%= yeoman.dist %>/public/ images'
287287 } ]
288288 }
289289 } ,
290+
290291 htmlmin: {
291292 dist : {
292293 options : {
@@ -297,9 +298,9 @@ module.exports = function (grunt) {
297298 } ,
298299 files : [ {
299300 expand : true ,
300- cwd : '<%%= yeoman.app %>/<%%= yeoman. views %> ' ,
301+ cwd : '<%%= yeoman.app %>/views' ,
301302 src : [ '*.html' , 'partials/*.html' ] ,
302- dest : '<%%= yeoman.views %>'
303+ dest : '<%%= yeoman.dist %>/views '
303304 } ]
304305 }
305306 } ,
@@ -320,7 +321,7 @@ module.exports = function (grunt) {
320321 // Replace Google CDN references
321322 cdnify: {
322323 dist : {
323- html : [ '<%%= yeoman.views %>/*.html' ]
324+ html : [ '<%%= yeoman.dist %>/views /*.html' ]
324325 }
325326 } ,
326327
@@ -331,7 +332,7 @@ module.exports = function (grunt) {
331332 expand : true ,
332333 dot : true ,
333334 cwd : '<%%= yeoman.app %>' ,
334- dest : '<%%= yeoman.dist %>' ,
335+ dest : '<%%= yeoman.dist %>/public ' ,
335336 src : [
336337 '*.{ico,png,txt}' ,
337338 '.htaccess' ,
@@ -342,28 +343,17 @@ module.exports = function (grunt) {
342343 } , {
343344 expand : true ,
344345 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'
348349 } , {
349350 expand : true ,
350351 cwd : '.tmp/images' ,
351- dest : '<%%= yeoman.dist %>/images' ,
352+ dest : '<%%= yeoman.dist %>/public/ images' ,
352353 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- ]
364354 } , {
365355 expand : true ,
366- dest : 'heroku ' ,
356+ dest : '<%%= yeoman.dist %> ' ,
367357 src : [
368358 'package.json' ,
369359 'server.js' ,
@@ -484,11 +474,10 @@ module.exports = function (grunt) {
484474 'usemin'
485475 ]);
486476
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+ } );
492481
493482 grunt.registerTask('default', [
494483 'newer:jshint',
0 commit comments