| Total Complexity | 3 |
| Complexity/F | 1 |
| Lines of Code | 40 |
| Function Count | 3 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | /** |
||
| 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 |