Skip to content

Commit

Permalink
Browserify generating UMD
Browse files Browse the repository at this point in the history
  • Loading branch information
xcthulhu committed Nov 7, 2015
1 parent 10fa464 commit 646096a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions gulpfile.js
Expand Up @@ -26,15 +26,15 @@ var git = require('gulp-git');

var binPath = path.resolve(__dirname, './node_modules/.bin/');
var browserifyPath = path.resolve(binPath, './browserify');
var derequirePath = path.resolve(binPath, './derequire');
var uglifyPath = path.resolve(binPath, './uglifyjs');
var indexPath = path.resolve(__dirname, './lib/bitauth-browserify');
var indexPath = path.resolve(__dirname, './lib/bitauth-browserify.js');
var namePath = path.resolve(__dirname, './bitauth');
var bundlePath = namePath + '.js';
var minPath = namePath + '.min.js';

var browserifyCommand = browserifyPath + ' -p bundle-collapser/plugin --require ' +
indexPath + ':bitauth -o ' + bundlePath;
var uglifyCommand = uglifyPath + ' ' + bundlePath + ' --compress --mangle -o ' + minPath;
var browserifyCommand = [browserifyPath, indexPath, '--standalone', 'bitauth', '|', derequirePath, '>', bundlePath].join(' ');
var uglifyCommand = [uglifyPath, bundlePath, '--compress', '--mangle', '-o', minPath].join(' ');

gulp.task('browser:uncompressed', shell.task([
browserifyCommand
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -36,9 +36,9 @@
},
"devDependencies": {
"benchmark": "^1.0.0",
"bundle-collapser": "^1.2.1",
"browserify": "~11.2.0",
"chai": "=1.9.1",
"derequire": "^2.0.3",
"gulp": "^3.8.10",
"gulp-bump": "^0.1.11",
"gulp-mocha": "^2.0.0",
Expand Down

0 comments on commit 646096a

Please sign in to comment.