Skip to content

Instantly share code, notes, and snippets.

@chris-peng-1244
Last active August 1, 2018 05:43
Show Gist options
  • Select an option

  • Save chris-peng-1244/6200d8b50315ee0483aa34b747ca6049 to your computer and use it in GitHub Desktop.

Select an option

Save chris-peng-1244/6200d8b50315ee0483aa34b747ca6049 to your computer and use it in GitHub Desktop.
const gulp = require('gulp');
const gulpBabel= require('gulp-babel');
const sourceMaps = require('gulp-sourcemaps');
gulp.task('build', () => {
gulp.src('src/**/*.js')
.pipe(sourceMaps.init())
.pipe(gulpBabel({
"presets": [
[
"env"
]
],
"sourceMaps": true,
}))
.pipe(sourceMaps.write('.'))
.pipe(gulp.dest('dist'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment