Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jabez128
Created June 10, 2015 15:39
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 jabez128/908257b085cb22f0513c to your computer and use it in GitHub Desktop.
Save jabez128/908257b085cb22f0513c to your computer and use it in GitHub Desktop.
use babel to write ES6 code now
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