Created
February 22, 2014 17:59
-
-
Save sukima/9159034 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var browserify = require('gulp-browserify'); | |
var uglify = require('gulp-uglify'); | |
var paths = { | |
script: 'lib/PasswordWidget.js', | |
}; | |
function isProduction() { | |
return true; // I don't know how to test this one. | |
} | |
gulp.task('scripts', function() { | |
var stream = gulp.src(paths.script) | |
.pipe(browserify()); | |
if (isProduction()) { | |
stream = stream.pipe(uglify()); | |
} | |
return stream.pipe(gulp.dest('./')); | |
}); | |
gulp.task('default', ['scripts']); | |
/* vim:set ts=2 sw=2 et fdm=marker: */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment