Initial lodash template=… build support.

Former-commit-id: 9d13021463380556a997cb53f5ae89eb22a7b98b
This commit is contained in:
John-David Dalton
2012-09-23 21:28:47 -07:00
parent 8492c13e72
commit 5d2d86bffc
6 changed files with 440 additions and 341 deletions

View File

@@ -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';
}

View File

@@ -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();