Created
April 20, 2016 12:37
-
-
Save mderijcke/f3f243e8bb43a0c1c6ebfcbe52cf1295 to your computer and use it in GitHub Desktop.
Gulp Babel
This file contains 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
const babel = require("gulp-babel") | |
const cache = require("gulp-cached") | |
const gulp = require("gulp") | |
const plumber = require("gulp-plumber") | |
gulp.task("compile", () => | |
gulp.src("src/**/*.js") | |
.pipe(plumber()) | |
.pipe(cache("babel")) | |
.pipe(babel()) | |
.pipe(gulp.dest("lib")) | |
) | |
gulp.task("watch", () => | |
gulp.watch("src/**/*.js", ["compile"]) | |
) | |
gulp.task("default", ["watch", "compile"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment