Created
June 10, 2015 15:39
-
-
Save jabez128/908257b085cb22f0513c to your computer and use it in GitHub Desktop.
use babel to write ES6 code now
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
var gulp = require('gulp') | |
var sourcemaps = require('gulp-sourcemaps') | |
var babel = require('gulp-babel') | |
var concat = require('gulp-concat') | |
gulp.task('default',function(){ | |
gulp.src('src/**/*.js') | |
.pipe(sourcemaps.init()) | |
.pipe(concat('all.js')) | |
.pipe(babel()) | |
.pipe(soucemaps.write('.')) | |
.pipe(gulp.dest('dist')) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment