Last active
May 5, 2017 12:59
-
-
Save YasushiKobayashi/2c2c9e1e733484960fa9d9696fbaabd9 to your computer and use it in GitHub Desktop.
gulp.bable.js
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
import gulp from 'gulp'; | |
import eslint from 'gulp-eslint'; | |
import babel from 'gulp-babel'; | |
import coffeelint from 'gulp-coffeelint'; | |
import uglify from 'gulp-uglify'; | |
import babelify from 'babelify'; | |
import browserify from 'browserify'; | |
import source from 'vinyl-source-stream'; | |
import transform from 'vinyl-transform'; | |
gulp.task('coffeeLint', () => { | |
gulp.src('bot/scripts/*.coffee') | |
.pipe(coffeelint()) | |
.pipe(coffeelint.reporter()); | |
}); | |
gulp.task('jsLint', () => { | |
gulp.src('bot/*.js') | |
.pipe(eslint({ useEslintrc: true })) | |
.pipe(eslint.format()) | |
.pipe(eslint.failAfterError()); | |
}); | |
gulp.task('jsBuild', () => { | |
gulp.src('bot/es/*.js') | |
.pipe(babel()) | |
.pipe(gulp.dest('./bot/scripts/')); | |
gulp.src('es/*.js') | |
.pipe(babel()) | |
.pipe(gulp.dest('./js')); | |
}); | |
gulp.task('default', ['build'], () => { | |
gulp.watch( | |
['bot/es/*.js', 'es/*.js'], | |
['build'], | |
); | |
}); | |
gulp.task('build', ['jsBuild'], () => {}); | |
gulp.task('lint', ['jsLint'], () => {}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment