-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGulpfile.js
More file actions
27 lines (25 loc) · 749 Bytes
/
Gulpfile.js
File metadata and controls
27 lines (25 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
var gulp = require('gulp'),
gutil = require('gulp-util'),
jshint = require('gulp-jshint'),
browserify = require('gulp-browserify'),
concat = require('gulp-concat'),
clean = require('gulp-clean');
// Browserify task
gulp.task('browserify', function() {
// Single point of entry (make sure not to src ALL your files, browserify will figure it out for you)
gulp.src(['static/js/app.js'])
.pipe(browserify({
insertGlobals: true,
debug: true
}))
// Bundle to a single file
.pipe(concat('static/dist/bundle.js'))
// Output it to our dist folder
.pipe(gulp.dest('./'));
});
gulp.task('watch', function() {
// Watch our scripts
gulp.watch(['static/js/*.js', 'static/js/**/*.js'],[
'browserify'
]);
});