gulpfile.babel.js   A
last analyzed

Complexity

Total Complexity 3
Complexity/F 1

Size

Lines of Code 40
Function Count 3

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 0
c 2
b 0
f 0
nc 1
dl 0
loc 40
rs 10
wmc 3
mnd 0
bc 3
fnc 3
bpm 1
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A ➔ ??? 0 20 1
1
/**
2
*
3
* Gulpfile for strman
4
*
5
* @author Daniel Leite de Oliveira <[email protected]>
6
*
7
*/
8
import gulp from 'gulp';
9
import uglify from 'gulp-uglify';
10
import buffer from 'vinyl-buffer';
11
import browserify from 'browserify';
12
import babelify from 'babelify';
13
import es6ify from 'es6ify';
14
import deglobalify from 'deglobalify';
15
import source from 'vinyl-source-stream';
16
import babel from 'gulp-babel';
17
18
gulp.task('browserify', () => {
19
  browserify({
20
    entries: './src/strman.js',
21
    transform: [babelify, es6ify, deglobalify],
22
23
    // Generate a UMD bundle for the supplied export name.
24
    // This bundle works with other module systems and sets the name
25
    // given as a window global if no module system is found.
26
    standalone: '_s',
27
28
    // Enable source maps that allow you to debug your files
29
    // separately.
30
    debug: true
31
  })
32
  .bundle()
33
  .pipe(source('strman.js'))
34
  .pipe(buffer())
35
  .pipe(uglify())
36
  .pipe(gulp.dest('dist'));
37
});
38
39
gulp.task('babel', () => {
40
  gulp.src('./src/**/*.js')
41
    .pipe(babel({
42
      presets: ['es2015']
43
    }))
44
    .pipe(gulp.dest('transpiler'));
45
});
46
47
gulp.task('default', ['browserify', 'babel'], () => {});
48