gulpfile.js
676 Bytes
/**
* Created by Techniv on 12/01/2017.
*/
const gulp = require('gulp'),
del = require('del'),
sourcemaps = require('gulp-sourcemaps'),
babel = require('gulp-babel'),
rename = require('gulp-rename');
const distPath = './dist/';
const srcPath = './src/matrix-validation.js';
gulp.task('clean', () => {
return del(distPath);
});
gulp.task('build', () => {
gulp.src(srcPath)
.pipe(gulp.dest(distPath))
.pipe(sourcemaps.init())
.pipe(babel({presets:['es2015']}))
.pipe(rename(path => {
path.basename += '-es2015'
}))
.pipe(sourcemaps.write())
.pipe(gulp.dest(distPath));
});