mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Initial lodash template=… build support.
Former-commit-id: 9d13021463380556a997cb53f5ae89eb22a7b98b
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
}
|
||||
},
|
||||
['lodash', 'shimmed', 'underscore'], function(lodash, shimmed, underscore) {
|
||||
if (lodash.noConflict) {
|
||||
if (lodash && lodash.noConflict) {
|
||||
lodashModule = lodash.noConflict();
|
||||
lodashModule.moduleName = 'lodash';
|
||||
}
|
||||
@@ -70,7 +70,7 @@
|
||||
shimmedModule = shimmed.noConflict();
|
||||
shimmedModule.moduleName = 'shimmed';
|
||||
}
|
||||
if (underscore.noConflict) {
|
||||
if (underscore && underscore.noConflict) {
|
||||
underscoreModule = underscore.noConflict();
|
||||
underscoreModule.moduleName = 'underscore';
|
||||
}
|
||||
|
||||
@@ -165,6 +165,7 @@
|
||||
'isNull',
|
||||
'isNumber',
|
||||
'isObject',
|
||||
'isPlainObject',
|
||||
'isRegExp',
|
||||
'isString',
|
||||
'isUndefined',
|
||||
@@ -238,19 +239,12 @@
|
||||
|
||||
/** List of methods used by Underscore */
|
||||
var underscoreMethods = _.without.apply(_, [allMethods].concat([
|
||||
'countBy',
|
||||
'forIn',
|
||||
'forOwn',
|
||||
'invert',
|
||||
'isPlainObject',
|
||||
'lateBind',
|
||||
'merge',
|
||||
'object',
|
||||
'omit',
|
||||
'pairs',
|
||||
'partial',
|
||||
'random',
|
||||
'unescape',
|
||||
'where'
|
||||
'partial'
|
||||
]));
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
@@ -654,7 +648,7 @@
|
||||
|
||||
asyncTest('`lodash ' + command +'`', function() {
|
||||
build(['-s'].concat(command.split(' ')), function(source, filepath) {
|
||||
equal(filepath, 'a.js', command);
|
||||
equal(path.basename(filepath), 'a.js', command);
|
||||
start();
|
||||
});
|
||||
});
|
||||
@@ -670,7 +664,7 @@
|
||||
var start = _.once(QUnit.start);
|
||||
|
||||
asyncTest('`lodash ' + command +'`', function() {
|
||||
build([command, 'exports=', 'include='], function(source, filepath) {
|
||||
build([command, 'exports=', 'include='], function(source) {
|
||||
equal(source, '');
|
||||
equal(arguments.length, 1);
|
||||
start();
|
||||
|
||||
Reference in New Issue
Block a user