mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Ensure custom builds generate lodash.custom files.
Former-commit-id: c89ee640688f6f598bb2d3834f714f0edc4ce7a4
This commit is contained in:
5
build.js
5
build.js
@@ -217,9 +217,6 @@
|
|||||||
/** Flag used to specify a mobile build */
|
/** Flag used to specify a mobile build */
|
||||||
var isMobile = process.argv.indexOf('mobile') > -1;
|
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');
|
source = source.replace(/(?:(?:\s*\/\/.*)*\s*lodash\._[^=]+=.+\n)+/g, '\n');
|
||||||
|
|
||||||
// begin the minification process
|
// begin the minification process
|
||||||
if (isCustom) {
|
if (filterType || isBackbone || isMobile) {
|
||||||
fs.writeFileSync(path.join(__dirname, 'lodash.custom.js'), source);
|
fs.writeFileSync(path.join(__dirname, 'lodash.custom.js'), source);
|
||||||
minify(source, 'lodash.custom.min', function(result) {
|
minify(source, 'lodash.custom.min', function(result) {
|
||||||
fs.writeFileSync(path.join(__dirname, 'lodash.custom.min.js'), result);
|
fs.writeFileSync(path.join(__dirname, 'lodash.custom.min.js'), result);
|
||||||
|
|||||||
Reference in New Issue
Block a user