-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
39 lines (34 loc) · 1019 Bytes
/
gulpfile.js
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
28
29
30
31
32
33
34
35
36
37
38
39
var path = require('path');
var gulp = require('gulp');
var browserify = require('browserify'),
jshint = require('gulp-jshint'),
source = require('vinyl-source-stream'),
rename = require('gulp-rename'),
runSequence = require('run-sequence'),
uglify = require('gulp-uglify');
gulp.task('browserify', [], function() {
var options = {
entries: path.join(__dirname, './index.js'),
standalone: 'katie'
};
return browserify(options)
.bundle()
.pipe(source('flux-factory.js'))
.pipe(gulp.dest('./'))
});
gulp.task('lint', [], function() {
return gulp.src('src/**/*.js')
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'));
});
gulp.task('compress', function() {
gulp.src('build/*.js')
.pipe(uglify())
.pipe(rename(function (path) {
path.basename += "-min";
}))
.pipe(gulp.dest('build'));
});
gulp.task('default', [], function() {
runSequence(['lint'], ['browserify']);
});