var gulp = require('gulp'); //gulpをインポート
var postcssimport = require('postcss-import');
var postcss = require('gulp-postcss'); //gulp-postcssをインポート
var cssnext = require('postcss-cssnext'); //cssnextをインポート
var csswring = require('csswring');
var babel = require("gulp-babel");
var browserSync = require('browser-sync').create();
gulp.task('babeltrance', function() {
gulp.src('dest-after/js/babel/*')
.pipe(babel())
.pipe(gulp.dest('dest-after/js'))
});
gulp.task('babelwatch', function() {
gulp.watch('dest-after/js/babel/*', ['babel'])
});
gulp.task('babel', ['babeltrance', 'babelwatch']);
[17:41:45] Finished 'babel' after 9.32 μs
[17:59:09] Starting 'babeltrance'...
[17:59:09] Finished 'babeltrance' after 3.6 ms
[17:59:09] Starting 'babelwatch'...
[17:59:09] Finished 'babelwatch' after 4.08 ms
[17:59:09] Starting 'babel'...
[17:59:09] Finished 'babel' after 9.72 μs
[17:59:09] Starting 'babeltrance'...
[17:59:09] Finished 'babeltrance' after 7.16 ms
[17:59:09] Starting 'babelwatch'...
[17:59:09] Finished 'babelwatch' after 4.01 ms