1 | var gulp = require('gulp');
|
2 | var source = require('vinyl-source-stream');
|
3 | var streamify = require('gulp-streamify');
|
4 | var browserify = require('browserify');
|
5 | var jshint = require('gulp-jshint');
|
6 | var uglify = require('gulp-uglify');
|
7 |
|
8 | var shouldMinify = false;
|
9 | var bumpType = 'prerelease';
|
10 |
|
11 | gulp.task('default', [
|
12 | 'build-bundle'
|
13 | ]);
|
14 |
|
15 | gulp.task('lint', [
|
16 | 'lint-js'
|
17 | ]);
|
18 |
|
19 | gulp.task('build-bundle', [], function() {
|
20 | return browserify('./index.js', {
|
21 | standalone: 'LiveShot'
|
22 | })
|
23 | .bundle()
|
24 | .pipe(source('liveshot-min.js'))
|
25 | .pipe(streamify(uglify()))
|
26 | .pipe(gulp.dest('./build'));
|
27 | });
|
28 |
|
29 | gulp.task('lint-js', function() {
|
30 | return gulp.src(['./src/**/*.js'])
|
31 | .pipe(jshint())
|
32 | .pipe(jshint.reporter('default'));
|
33 | });
|