Ensure custom builds generate lodash.custom files.

Former-commit-id: c89ee640688f6f598bb2d3834f714f0edc4ce7a4
This commit is contained in:
John-David Dalton
2012-06-13 15:15:20 -04:00
parent aef130b396
commit ee2d0ddf8a

View File

@@ -217,9 +217,6 @@
/** Flag used to specify a mobile build */
var isMobile = process.argv.indexOf('mobile') > -1;
/** Flag used to specify a custom build */
var isCustom = filterType || isBackbone || isMobile;
/*--------------------------------------------------------------------------*/
/**
@@ -618,7 +615,7 @@
source = source.replace(/(?:(?:\s*\/\/.*)*\s*lodash\._[^=]+=.+\n)+/g, '\n');
// begin the minification process
if (isCustom) {
if (filterType || isBackbone || isMobile) {
fs.writeFileSync(path.join(__dirname, 'lodash.custom.js'), source);
minify(source, 'lodash.custom.min', function(result) {
fs.writeFileSync(path.join(__dirname, 'lodash.custom.min.js'), result);