@@ -14,16 +14,17 @@ const partials = () => {
14
14
paths . src + '/{app,components}/**/*.html' ,
15
15
paths . tmp + '/{app,components}/**/*.html'
16
16
] )
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 ,
21
22
} ) )
22
23
. pipe ( $ . angularTemplatecache ( 'templateCacheHtml.js' , {
23
24
module : 'topcoderX' ,
24
25
root : 'app' ,
25
26
} ) )
26
- . pipe ( gulp . dest ( paths . tmp + '/partials/' ) ) ;
27
+ . pipe ( gulp . dest ( paths . tmp + '/partials/' ) )
27
28
}
28
29
gulp . task ( 'partials' , partials ) ;
29
30
@@ -40,17 +41,17 @@ const htmlFn = () => {
40
41
return gulp . src ( paths . tmp + '/serve/*.html' )
41
42
. pipe ( $ . inject ( partialsInjectFile , partialsInjectOptions ) )
42
43
. pipe ( $ . useref ( ) )
43
- . pipe ( rev ( ) )
44
+ . pipe ( gulpIf ( '!**/*.html' , rev ( ) ) )
44
45
. pipe ( gulpIf ( '**/*.js' , $ . ngAnnotate ( ) ) )
45
46
. pipe ( gulpIf ( '**/*.js' , $ . uglify ( ) ) )
46
47
. pipe ( gulpIf ( '**/*.css' , $ . replace ( / \. ? \. ? \/ n o d e _ m o d u l e s \/ \w + - ? \/ ? \w + \/ f o n t s \/ ? / g, '../fonts/' ) ) )
47
48
. pipe ( gulpIf ( '**/*.css' , $ . csso ( ) ) )
48
49
. 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 ,
54
55
} ) ) )
55
56
. pipe ( gulp . dest ( paths . dist + '/' ) )
56
57
. pipe ( $ . size ( { title : paths . dist + '/' , showFiles : true } ) )
@@ -59,7 +60,7 @@ const htmlFn = () => {
59
60
} ) ;
60
61
}
61
62
const html = gulp . series ( inject , partials , htmlFn ) ;
62
- gulp . task ( 'html' , htmlFn ) ;
63
+ gulp . task ( 'html' , html ) ;
63
64
64
65
const images = ( ) => {
65
66
return gulp . src ( paths . src + '/assets/images/**/*' )
@@ -106,9 +107,7 @@ const lint = () => {
106
107
. src ( [ 'src/**/*.js' , '!src/front/e2e/**/*.js' , '!src/public/**' , '!gulp/**' , '!node_modules/**' ] )
107
108
// eslint() attaches the lint output to the "eslint" property
108
109
// of the file object so it can be used by other modules.
109
- . pipe ( eslint ( {
110
- fix : true
111
- } ) )
110
+ . pipe ( eslint ( { fix : true } ) )
112
111
// eslint.format() outputs the lint results to the console.
113
112
// Alternatively use eslint.formatEach() (see Docs).
114
113
. pipe ( eslint . format ( ) )
0 commit comments