Skip to content

Instantly share code, notes, and snippets.

@grvcoelho
Last active August 29, 2015 14:11
Show Gist options
  • Save grvcoelho/46edb91d78967f705cee to your computer and use it in GitHub Desktop.
Save grvcoelho/46edb91d78967f705cee to your computer and use it in GitHub Desktop.
Example of the use of gulp-plumber
/**
* Require gulp
*/
var gulp = require('gulp');
/**
* Require gulp dependencies
*/
var concat = require('gulp-concat');
var plumber = require('gulp-plumber');
var uglify = require('gulp-uglify');
/**
* Set scripts defaults
*/
var jsFiles = ['front/app/**/*.js'];
var jsDest = 'public/assets/javascripts/app.js';
/**
* Create the scripts task
*/
gulp.task('scripts', function() {
return gulp
.src(jsFiles)
.pipe(plumber())
.pipe(concat('app.js'))
.pipe(uglify())
.pipe(gulp.dest(jsDest));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment