How to use gulp-plumber - 10 common examples

To help you get started, we’ve selected a few gulp-plumber examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dvlsg / async-csp / gulpfile.js View on Github external
gulp.task('build:cjs', () => {
  return gulp
    .src(srcGlob)
    .pipe(plumber())
    .pipe(babel()) // config in .babelrc
    .pipe(plumber.stop())
    .pipe(gulp.dest(distCjsDir))
})
github divio / djangocms-text-ckeditor / gulpfile.js View on Github external
gulp.task('lint:javascript', function () {
    // DOCS: http://eslint.org
    return gulp.src(PROJECT_PATTERNS.js)
        .pipe(gulpif(!process.env.CI, plumber()))
        .pipe(eslint())
        .pipe(eslint.format())
        .pipe(eslint.failAfterError())
        .pipe(gulpif(!process.env.CI, plumber.stop()));
});
github divio / django-cms / gulpfile.js View on Github external
gulp.task('lint:javascript', function() {
    // DOCS: http://eslint.org
    return gulp
        .src(PROJECT_PATTERNS.js)
        .pipe(gulpif(!process.env.CI, plumber()))
        .pipe(eslint())
        .pipe(eslint.format())
        .pipe(eslint.failAfterError())
        .pipe(gulpif(!process.env.CI, plumber.stop()));
});
github PrismarineJS / flying-squid / gulpfile.js View on Github external
gulp.task('compile', function() {
  return gulp
    .src('src/**/*.js')
    .pipe(plumber({
      errorHandler: function(err) {
        console.error(err.stack);
        this.emit('end');
      }
    }))
    .pipe(sourcemaps.init())
    .pipe(babel(options))
    .pipe(plumber.stop())
    .pipe(sourcemaps.write('maps/'))
    .pipe(gulp.dest('dist/'));
});
github jimmymintzer / reacter-news / gulpfile.js View on Github external
gulp.task('sass', function () {
  return gulp.src('scss/**/*.scss')
    .pipe(plumber())
    .pipe(sourcemaps.init())
    .pipe(sass({errLogToConsole: true}))
    .pipe(sourcemaps.write('./'))
    .pipe(plumber.stop())
    .pipe(gulp.dest('./dist/css'))
    .pipe(reload({stream:true}));
});
github bazooka-ci / bazooka / web / gulpfile.js View on Github external
gulp.task('css:sass', function() {
    gulp.src(paths.src.scss)
        .pipe(plumber())
        .pipe(sourcemaps.init())
        .pipe(sass())
        .pipe(sourcemaps.write())
        .pipe(plumber.stop())
        .pipe(gulp.dest(paths.dest.css))
        .pipe(connect.reload());
});
github sbussetti / deluge-siphon / gulpfile.js View on Github external
function buildJS ( src, destFile ) {
  return gulp.src( src )
    .pipe( plumber( {
      errorHandler: notify.onError( function ( error ) {
        return error.name + ': ' + error.message + '\n' + error.cause.filename + '[' + error.cause.line + ':' + error.cause.col + '] ' + error.cause.message;
      } )
    } ) )
    .pipe( sourcemaps.init() )
    .pipe( uglify() )
    .pipe( plumber.stop() )
    .pipe( concat( destFile ) )
    .pipe( sourcemaps.write( 'maps' ) )
    .pipe( gulp.dest( './build/' ) )
    .pipe( notify( {
      title: 'Gulp',
      message: 'Built: ' + destFile,
      onLast: true
    } ) );
}
github zoeDylan / jobTemplate / gulpfile.js View on Github external
.pipe(plumber())
        .pipe(sourcemaps.init())
        .pipe(less())
        .pipe(autoprefixer())
        .pipe(minify({
            minify: true,
            collapseWhitespace: true,
            conservativeCollapse: true,
            minifyCSS: true,
            getKeptComment: function (content, filePath) {
                var m = content.match(/\/\*![\s\S]*?\*\//img);
                return m && m.join('\n') + '\n' || '';
            }
        }))
        .pipe(sourcemaps.write('../maps'))
        .pipe(plumber.stop())
        .pipe(gulp.dest('statics/css'));
}
github SyneticNL / Gulp-for-Drupal / gulpfile.js View on Github external
debug: config.js.sourcemaps.debug
    })))
    .pipe(order(bootstrap, {base: './'}))
    .pipe(concat('bootstrap.js'))
    .pipe(gulpif(config.js.sourcemaps.generate == true, sourcemaps.write(config.js.sourcemaps.location, {
      addComment: config.js.sourcemaps.addcomment,
      includeContent: config.js.sourcemaps.includeContent,
      sourceRoot: function (file) {
        return '../'.repeat(file.relative.split('\\').length) + 'src';
      },
      destPath: config.js.sourcemaps.destpath,
      sourceMappingURLPrefix: config.js.sourcemaps.sourcemappingurlprefix,
      debug: config.js.sourcemaps.debug,
      charset: config.js.sourcemaps.charset
    })))
    .pipe(plumber.stop())
    .pipe(gulp.dest(config.locations.javascript.libraries))
    .pipe(gulpif(config.js.minify === true, uglify()))
    .pipe(gulpif(config.js.minify === true, rename(function (path) {
      path.basename += '.min';
    })))
    .pipe(gulpif(config.js.minify === true, gulp.dest(config.locations.javascript.libraries)))
    .pipe(gulpif(config.js.gzip === true, gzip()))
    .pipe(gulpif(config.js.gzip === true, gulp.dest(config.locations.javascript.libraries)));
}
github zoeDylan / jobTemplate / gulpfile.js View on Github external
function _js() {
    gulp.src('source/js/*.js')
        .pipe(debug({ title: 'js:' }))
        .pipe(plumber())
        .pipe(babel({
            presets: ['es2015']
        }))
        .pipe(concat('main.js'))
        .pipe(plumber.stop())
        .pipe(gulp.dest('statics/js'));
}

gulp-plumber

Prevent pipe breaking caused by errors from gulp plugins

MIT
Latest version published 6 years ago

Package Health Score

50 / 100
Full package analysis

Popular gulp-plumber functions