Created
February 1, 2016 15:05
-
-
Save sbalay/a5f738da5004a4b430f2 to your computer and use it in GitHub Desktop.
Simple js gulp task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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