Total Complexity | 3 |
Complexity/F | 1.5 |
Lines of Code | 18 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | const fs = require('fs'); |
||
2 | |||
3 | module.exports = function (gulp, plugins, config, env) { |
||
4 | return function html() { |
||
5 | return gulp.src(env.production() ? config.build + '/*.html' : 'html/*.html') |
||
6 | .pipe(plugins.realFavicon.injectFaviconMarkups(JSON.parse(fs.readFileSync(config.faviconData)).favicon.html_code)) |
||
7 | .pipe(env.production(plugins.inlineSource({ compress: false }))) |
||
8 | .pipe(plugins.cacheBust({ |
||
9 | type: 'timestamp' |
||
10 | })) |
||
11 | .pipe(plugins.htmlmin({ |
||
12 | removeComments: true, |
||
13 | collapseWhitespace: true, |
||
14 | minifyJS: true |
||
15 | })) |
||
16 | .pipe(gulp.dest(config.build)); |
||
17 | }; |
||
18 | }; |
||
19 |