Right now I have this code
var gulp = require('gulp');
var babel = require('gulp-babel');
var babelify = require('babelify');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
gulp.task('watch', function() {
gulp.watch('./scripts/es6/*.es6', ['modules'])
});
gulp.task('modules', function() {
browserify({
entries: './scripts/es6/popup.es6',
debug: true
})
.transform(babelify)
.bundle()
.pipe(source('popup.js'))
.pipe(gulp.dest('./scripts'));
});
Right now it is only compiling popup.es6 when it changes, but I want it to compile anything in the ./scripts/es6/
directory. I know it's possible, but how do you do it?
I figured it out. I just removed browserfy and simplified it down to this