Skip to content

Instantly share code, notes, and snippets.

@sbalay
Created February 1, 2016 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbalay/a5f738da5004a4b430f2 to your computer and use it in GitHub Desktop.
Save sbalay/a5f738da5004a4b430f2 to your computer and use it in GitHub Desktop.
Simple js gulp task
import gulp from 'gulp';
import eslint from 'gulp-eslint';
import babel from 'gulp-babel';
import sourcemaps from 'gulp-sourcemaps';
const localConfig = {
src: './src/js/**/*.js',
dest: './build/js/'
};
gulp.task('js', () =>
gulp.src(localConfig.src)
.pipe(eslint())
.pipe(eslint.format())
.pipe(sourcemaps.init())
.pipe(babel())
.pipe(sourcemaps.write())
.pipe(gulp.dest(localConfig.dest))
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment