UNPKG

772 BJavaScriptView Raw
1var gulp = require('gulp');
2var source = require('vinyl-source-stream');
3var streamify = require('gulp-streamify');
4var browserify = require('browserify');
5var jshint = require('gulp-jshint');
6var uglify = require('gulp-uglify');
7
8var shouldMinify = false;
9var bumpType = 'prerelease';
10
11gulp.task('default', [
12 'build-bundle'
13]);
14
15gulp.task('lint', [
16 'lint-js'
17]);
18
19gulp.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
29gulp.task('lint-js', function() {
30 return gulp.src(['./src/**/*.js'])
31 .pipe(jshint())
32 .pipe(jshint.reporter('default'));
33});