K
K
KononovD2019-08-09 21:08:32
JavaScript
KononovD, 2019-08-09 21:08:32

Is it possible to stop pipe execution for a specific file in gulp?

Hello! There is such a gallp task:

function jsBuild () {
  return gulp.src( path.app.js )
    .pipe( sourcemaps.init() )
    .pipe( babel() )
    .pipe( concat( 'main.js' ) )
    .pipe( uglify( {
      toplevel: true
    } ) )
    .pipe( replace( '"use strict";', '' ) )
    .pipe( sourcemaps.write( './' ) )
    .pipe( gulp.dest( path.dist.js ) )
    .pipe( browserSync.stream() );
}

and these are the paths:
app: {
    html: 'app/*.html',
    js: [
      'app/js/jquery-3.4.1.min.js',
      'app/js/jquery.treeSelector.js',
      'app/js/parallax_background.js',
      'app/js/TweenLite.min.js',
      'app/js/wow.min.js',
      'app/js/CSSPlugin.min.js',
      'app/js/popper.min.js',
      'app/js/main.js',
    ],
    mainJs: 'app/js/main.js',
    scss: 'app/css/main.scss',
    img: 'app/img/**/*.*',
    fonts: 'app/fonts/**/*.*'
  },

is it possible to somehow make it so that when the task is done for popper.js, not all pipes are executed? Popper breaks after beable (.babelrc:
{
    "presets": [
        "@babel/env"
    ]
}
)
It turns out that you need to skip the pipe with the beyble / babel, whatever you like) and with uglify, because uglify breaks when it sees const or God forbid es modules.
Thanks

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question