Passed
Pull Request — develop (#338)
by
unknown
05:25
created

gulp/tasks/html.js   A

Complexity

Total Complexity 3
Complexity/F 1.5

Size

Lines of Code 18
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 13
mnd 1
bc 1
fnc 2
dl 0
loc 18
rs 10
bpm 0.5
cpm 1.5
noi 0
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A html.js ➔ html 0 14 3
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