minify bundle
This commit is contained in:
parent
25c95cdb47
commit
348cf50636
@ -30,6 +30,7 @@ var list = function(val) {
|
|||||||
program
|
program
|
||||||
.version('0.0.1')
|
.version('0.0.1')
|
||||||
.option('-a, --includeall', 'Include all submodules.')
|
.option('-a, --includeall', 'Include all submodules.')
|
||||||
|
.option('-d, --dontminify', 'Don\'t minify the code.')
|
||||||
.option('-s, --submodules <items>', 'Include the listed comma-separated submodules.', list)
|
.option('-s, --submodules <items>', 'Include the listed comma-separated submodules.', list)
|
||||||
.parse(process.argv);
|
.parse(process.argv);
|
||||||
|
|
||||||
@ -98,8 +99,14 @@ modules.forEach(function(m) {
|
|||||||
});
|
});
|
||||||
b.require('soop');
|
b.require('soop');
|
||||||
|
|
||||||
b.bundle().pipe(fs.createWriteStream('browser/bundle.js'));
|
if (!program.dontminify) {
|
||||||
|
b.transform({
|
||||||
|
global: true
|
||||||
|
}, 'uglifyify');
|
||||||
|
}
|
||||||
|
|
||||||
|
var bundle = b.bundle();
|
||||||
|
bundle = bundle.pipe(fs.createWriteStream('browser/bundle.js'));
|
||||||
|
|
||||||
opts.standalone = 'testdata';
|
opts.standalone = 'testdata';
|
||||||
var tb = browserify(opts);
|
var tb = browserify(opts);
|
||||||
|
|||||||
@ -60,7 +60,8 @@
|
|||||||
"commander": "~2.1.0",
|
"commander": "~2.1.0",
|
||||||
"browserify-bignum": "git://github.com/maraoz/browserify-bignum.git",
|
"browserify-bignum": "git://github.com/maraoz/browserify-bignum.git",
|
||||||
"browserify-buffertools": "~1.0.2",
|
"browserify-buffertools": "~1.0.2",
|
||||||
"brfs": "~1.0.0"
|
"brfs": "~1.0.0",
|
||||||
|
"uglifyify": "~1.2.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"grunt-contrib-watch": "~0.5.3",
|
"grunt-contrib-watch": "~0.5.3",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user