mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 11:57:49 +00:00
Ensure build tweaks are applied when new lines break up specific patterns.
Former-commit-id: 085a837521750457db9f20f3701984cba24a4f4f
This commit is contained in:
2
build.js
2
build.js
@@ -691,7 +691,7 @@
|
|||||||
*/
|
*/
|
||||||
function writeFile(source, filename) {
|
function writeFile(source, filename) {
|
||||||
// correct overly aggressive Closure Compiler minification
|
// correct overly aggressive Closure Compiler minification
|
||||||
source = source.replace('prototype={valueOf:1}', 'prototype={valueOf:1,y:1}');
|
source = source.replace(/prototype\s*=\s*{\s*valueOf\s*:\s*1\s*}/, 'prototype={valueOf:1,y:1}');
|
||||||
|
|
||||||
// re-remove "use strict" added by the minifier
|
// re-remove "use strict" added by the minifier
|
||||||
if (!useStrict) {
|
if (!useStrict) {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
source = source.replace(/(\w)\["([^."]+)"\]/g, '$1.$2');
|
source = source.replace(/(\w)\["([^."]+)"\]/g, '$1.$2');
|
||||||
|
|
||||||
// correct AMD module definition for AMD build optimizers
|
// correct AMD module definition for AMD build optimizers
|
||||||
source = source.replace(/("function")==(typeof define)&&\(?("object")==(typeof define\.amd)(&&define\.amd)\)?/, '$2==$1&&$4==$3$5');
|
source = source.replace(/("function")\s*==\s*(typeof define)\s*&&\s*\(?\s*("object")\s*==\s*(typeof define\.amd)\s*&&\s*(define\.amd)\s*\)?/, '$2==$1&&$4==$3&&$5');
|
||||||
|
|
||||||
// add license
|
// add license
|
||||||
source = license + '\n;' + source;
|
source = license + '\n;' + source;
|
||||||
|
|||||||
Reference in New Issue
Block a user