device-discovery-cli/gulpfile.js

28 строки
641 B
JavaScript
Исходник Обычный вид История

2016-09-07 07:07:43 +03:00
const babel = require('gulp-babel');
2016-09-08 06:16:30 +03:00
const eslint = require('gulp-eslint');
2016-09-07 07:07:43 +03:00
const gulp = require('gulp');
gulp.task('build', ['compile', 'copyfiles']);
gulp.task('default', ['compile', 'copyfiles']);
gulp.task('compile', () => {
return gulp.src('src/**/*.js')
.pipe(babel({ presets: ['es2015', 'stage-0'] }))
.pipe(gulp.dest('dist'));
});
gulp.task('copyfiles', () => {
return gulp.src('src/**/*.csv')
.pipe(gulp.dest('dist'));
});
2016-09-08 06:16:30 +03:00
gulp.task('lint', () => {
return gulp.src([
'./src/**/*.js',
'!node_modules/**',
])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});