| Conditions | 1 |
| Paths | 1 |
| Total Lines | 35 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | 'use strict'; |
||
| 5 | module.exports = function (gulp, paths, plugins, options) { |
||
|
|
|||
| 6 | var filterByExtension = function (extension) { |
||
| 7 | return plugins.filter('**/*.' + extension); |
||
| 8 | }; |
||
| 9 | |||
| 10 | return function () { |
||
| 11 | var mainFiles = plugins.mainBowerFiles({ |
||
| 12 | paths: {bowerDirectory: paths.BOWER_PATH} |
||
| 13 | }); |
||
| 14 | |||
| 15 | if (!mainFiles.length) { |
||
| 16 | console.log('No bower files found'); |
||
| 17 | |||
| 18 | return false; |
||
| 19 | } |
||
| 20 | |||
| 21 | gulp.src(mainFiles) |
||
| 22 | .pipe(plugins.plumber()) |
||
| 23 | .pipe(filterByExtension('js')) |
||
| 24 | .pipe(plugins.sourcemaps.init()) |
||
| 25 | .pipe(plugins.concat('dist/js/vendor.js')) |
||
| 26 | .pipe(plugins.uglify()) |
||
| 27 | .pipe(plugins.sourcemaps.write('./')) |
||
| 28 | .pipe(gulp.dest(paths.THEME_PATH)); |
||
| 29 | |||
| 30 | gulp.src(mainFiles) |
||
| 31 | .pipe(plugins.plumber()) |
||
| 32 | .pipe(filterByExtension('css')) |
||
| 33 | .pipe(plugins.sourcemaps.init()) |
||
| 34 | .pipe(plugins.concat('dist/css/vendor.css')) |
||
| 35 | .pipe(plugins.sourcemaps.write('./')) |
||
| 36 | .pipe(plugins.browserSync.reload({stream: true})) |
||
| 37 | .pipe(gulp.dest(paths.THEME_PATH)) |
||
| 38 | }; |
||
| 39 | }; |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.