mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Add @license to minified copyright header to preserve it in case of double minification. [closes #138]
Former-commit-id: 6c9b72f9c807daac613ff2d4339c0e3c4e7cafe3
This commit is contained in:
@@ -9,11 +9,12 @@
|
||||
var licenseTemplate = {
|
||||
'lodash':
|
||||
'/*!\n' +
|
||||
' Lo-Dash @VERSION lodash.com/license\n' +
|
||||
' @license\n' +
|
||||
' Lo-Dash <%= VERSION %> lodash.com/license\n' +
|
||||
' Underscore.js 1.4.3 underscorejs.org/LICENSE\n' +
|
||||
'*/',
|
||||
'underscore':
|
||||
'/*! Underscore.js @VERSION underscorejs.org/LICENSE */'
|
||||
'/*! @license Underscore.js <%= VERSION %> underscorejs.org/LICENSE */'
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
@@ -51,7 +52,7 @@
|
||||
}
|
||||
// add copyright/license header
|
||||
return licenseTemplate[/call\(this\);?$/.test(source) ? 'underscore' : 'lodash']
|
||||
.replace('@VERSION', snippet[2]) + '\n;' + source;
|
||||
.replace('<%= VERSION %>', snippet[2]) + '\n;' + source;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user