@@ -317,12 +317,16 @@ module.exports = function (grunt) {
317
317
usemin: {
318
318
html : [ '<%%= yeoman.dist %>/{,*/}*.html' ] ,
319
319
css : [ '<%%= yeoman.dist %>/styles/{,*/}*.css' ] ,
320
+ js : [ '<%%= yeoman.dist %>/scripts/{,*/}*.js' ] ,
320
321
options : {
321
322
assetsDirs : [
322
323
'<%%= yeoman.dist %>' ,
323
324
'<%%= yeoman.dist %>/images' ,
324
325
'<%%= yeoman.dist %>/styles'
325
- ]
326
+ ] ,
327
+ patterns : {
328
+ js : [ [ / ( i m a g e s \/ [ ^ ' ' " " ] * \. ( p n g | j p g | j p e g | g i f | w e b p | s v g ) ) / g, 'Replacing references to images' ] ]
329
+ }
326
330
}
327
331
} ,
328
332
@@ -386,12 +390,25 @@ module.exports = function (grunt) {
386
390
files : [ {
387
391
expand : true ,
388
392
cwd : '<%%= yeoman.dist %>' ,
389
- src : [ '*.html' , 'views/{,*/}*.html' ] ,
393
+ src : [ '*.html' ] ,
390
394
dest : '<%%= yeoman.dist %>'
391
395
} ]
392
396
}
393
397
} ,
394
398
399
+ ngtemplates : {
400
+ dist : {
401
+ options : {
402
+ module : '<%= scriptAppName %>' ,
403
+ htmlmin : '<%%= htmlmin.dist.options %>' ,
404
+ usemin : 'scripts/scripts.js'
405
+ } ,
406
+ cwd : '<%%= yeoman.app %>' ,
407
+ src : 'views/{,*/}*.html' ,
408
+ dest : 'templateCache.js'
409
+ }
410
+ } ,
411
+
395
412
// ng-annotate tries to make the code safe for minification automatically
396
413
// by using the Angular long form for dependency injection.
397
414
ngAnnotate : {
@@ -424,7 +441,6 @@ module.exports = function (grunt) {
424
441
'*.{ico,png,txt}' ,
425
442
'.htaccess' ,
426
443
'*.html' ,
427
- 'views/{,*/}*.html' ,
428
444
'images/{,*/}*.{webp}' ,
429
445
'styles/fonts/{,*/}*.*'
430
446
]
@@ -524,6 +540,7 @@ module.exports = function (grunt) {
524
540
'useminPrepare' ,
525
541
'concurrent:dist' ,
526
542
'autoprefixer' ,
543
+ 'ngtemplates' ,
527
544
'concat' ,
528
545
'ngAnnotate' ,
529
546
'copy:dist' ,
0 commit comments