@@ -14,16 +14,17 @@ const partials = () => {
1414 paths . src + '/{app,components}/**/*.html' ,
1515 paths . tmp + '/{app,components}/**/*.html'
1616 ] )
17- . pipe ( $ . minifyHtml ( {
18- empty : true ,
19- spare : true ,
20- quotes : true
17+ . pipe ( $ . htmlmin ( {
18+ removeEmptyAttributes : true ,
19+ removeAttributeQuotes : true ,
20+ processConditionalComments : true ,
21+ collapseWhitespace : true ,
2122 } ) )
2223 . pipe ( $ . angularTemplatecache ( 'templateCacheHtml.js' , {
2324 module : 'topcoderX' ,
2425 root : 'app' ,
2526 } ) )
26- . pipe ( gulp . dest ( paths . tmp + '/partials/' ) ) ;
27+ . pipe ( gulp . dest ( paths . tmp + '/partials/' ) )
2728}
2829gulp . task ( 'partials' , partials ) ;
2930
@@ -40,17 +41,17 @@ const htmlFn = () => {
4041 return gulp . src ( paths . tmp + '/serve/*.html' )
4142 . pipe ( $ . inject ( partialsInjectFile , partialsInjectOptions ) )
4243 . pipe ( $ . useref ( ) )
43- . pipe ( rev ( ) )
44+ . pipe ( gulpIf ( '!**/*.html' , rev ( ) ) )
4445 . pipe ( gulpIf ( '**/*.js' , $ . ngAnnotate ( ) ) )
4546 . pipe ( gulpIf ( '**/*.js' , $ . uglify ( ) ) )
4647 . pipe ( gulpIf ( '**/*.css' , $ . replace ( / \. ? \. ? \/ n o d e _ m o d u l e s \/ \w + - ? \/ ? \w + \/ f o n t s \/ ? / g, '../fonts/' ) ) )
4748 . pipe ( gulpIf ( '**/*.css' , $ . csso ( ) ) )
4849 . pipe ( $ . revReplace ( ) )
49- . pipe ( gulpIf ( '**/*.html' , $ . minifyHtml ( {
50- empty : true ,
51- spare : true ,
52- quotes : true ,
53- conditionals : true
50+ . pipe ( gulpIf ( '**/*.html' , $ . htmlmin ( {
51+ removeEmptyAttributes : true ,
52+ removeAttributeQuotes : true ,
53+ processConditionalComments : true ,
54+ collapseWhitespace : true ,
5455 } ) ) )
5556 . pipe ( gulp . dest ( paths . dist + '/' ) )
5657 . pipe ( $ . size ( { title : paths . dist + '/' , showFiles : true } ) )
@@ -59,7 +60,7 @@ const htmlFn = () => {
5960 } ) ;
6061}
6162const html = gulp . series ( inject , partials , htmlFn ) ;
62- gulp . task ( 'html' , htmlFn ) ;
63+ gulp . task ( 'html' , html ) ;
6364
6465const images = ( ) => {
6566 return gulp . src ( paths . src + '/assets/images/**/*' )
@@ -106,9 +107,7 @@ const lint = () => {
106107 . src ( [ 'src/**/*.js' , '!src/front/e2e/**/*.js' , '!src/public/**' , '!gulp/**' , '!node_modules/**' ] )
107108 // eslint() attaches the lint output to the "eslint" property
108109 // of the file object so it can be used by other modules.
109- . pipe ( eslint ( {
110- fix : true
111- } ) )
110+ . pipe ( eslint ( { fix : true } ) )
112111 // eslint.format() outputs the lint results to the console.
113112 // Alternatively use eslint.formatEach() (see Docs).
114113 . pipe ( eslint . format ( ) )
0 commit comments