gulp/tasks/javascript.js   A
last analyzed

Complexity

Total Complexity 4
Complexity/F 1.33

Size

Lines of Code 13
Function Count 3

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 10
mnd 1
bc 1
fnc 3
dl 0
loc 13
rs 10
bpm 0.3333
cpm 1.3333
noi 0
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A javascript.js ➔ javascript 0 11 4
1
module.exports = function (gulp, plugins, config, env) {
2
  return function javascript() {
3
    return gulp.src('app.js')
4
      .pipe(env.development(plugins.sourcemaps.init()))
5
      .pipe(plugins.requirejsOptimize(env.production() ? config.requireJs.prod : config.requireJs.dev))
6
      .on('error', function () {
7
        this.emit('end');
8
      })
9
      .pipe(env.production(plugins.uglify({ output: { comments: 'all' } })))
10
      .pipe(env.development(plugins.sourcemaps.write('.', { addComment: true })))
11
      .pipe(gulp.dest(config.build));
12
  };
13
};
14