2017-03-14 20:33:11 +00:00
|
|
|
;(function () {
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var gulp = require('gulp');
|
|
|
|
var browserify = require('browserify');
|
|
|
|
var source = require('vinyl-source-stream');
|
|
|
|
var streamify = require('gulp-streamify');
|
|
|
|
var uglify = require('gulp-uglify');
|
|
|
|
var rename = require('gulp-rename');
|
|
|
|
|
|
|
|
gulp.task('default', function () {
|
2017-03-20 22:11:14 +00:00
|
|
|
return browserify('./browserify/crypto.fallback.js', {standalone: 'OAUTH3_crypto_fallback'}).bundle()
|
|
|
|
.pipe(source('browserify/crypto.fallback.js'))
|
|
|
|
.pipe(rename('oauth3.crypto.fallback.js'))
|
2017-03-14 20:33:11 +00:00
|
|
|
.pipe(gulp.dest('./'))
|
|
|
|
.pipe(streamify(uglify()))
|
2017-03-20 22:11:14 +00:00
|
|
|
.pipe(rename('oauth3.crypto.fallback.min.js'))
|
2017-03-14 20:33:11 +00:00
|
|
|
.pipe(gulp.dest('./'))
|
|
|
|
;
|
|
|
|
});
|
2017-03-17 23:14:47 +00:00
|
|
|
|
|
|
|
gulp.task('watch', function () {
|
|
|
|
gulp.watch('browserify/*.js', [ 'default' ]);
|
|
|
|
});
|
2017-03-14 20:33:11 +00:00
|
|
|
}());
|