Merge pull request #11 from srigi/c39f2c9c3781e56e01e8a8f42ec899125ca1f28e

Replace Underscore.js with Lo-Dash
This commit is contained in:
Tyler Kellen 2013-01-02 07:36:58 -08:00
commit 56edaf6b95
9 changed files with 33 additions and 38 deletions

View File

@ -28,7 +28,7 @@
"test": "grunt test" "test": "grunt test"
}, },
"dependencies": { "dependencies": {
"underscore": "~1.3.3", "lodash": "~1.0.0",
"grunt-lib-contrib": "~0.3.0" "grunt-lib-contrib": "~0.3.0"
}, },
"devDependencies": { "devDependencies": {

View File

@ -10,7 +10,7 @@
module.exports = function(grunt) { module.exports = function(grunt) {
var _ = require('underscore'); var _ = require('lodash');
// filename conversion for templates // filename conversion for templates
var defaultProcessName = function(name) { return name; }; var defaultProcessName = function(name) { return name; };

View File

@ -2,14 +2,13 @@ define(function(){
this["JST"] = this["JST"] || {}; this["JST"] = this["JST"] || {};
this["JST"]["test/fixtures/template.html"] = function(obj){ this["JST"]["test/fixtures/template.html"] = function(obj) {
var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')}; obj || (obj = {});
with(obj||{}){ var __t, __p = '', __e = _.escape, __d = obj.obj || obj;
__p+='<head><title>'+ __p += '<head><title>' +
( title )+ ((__t = ( obj.title )) == null ? '' : __t) +
'</title></head>'; '</title></head>';
} return __p
return __p;
}; };
return this["JST"]; return this["JST"];

View File

@ -1,11 +1,10 @@
this["JST"] = this["JST"] || {}; this["JST"] = this["JST"] || {};
this["JST"]["test/fixtures/template.html"] = function(obj){ this["JST"]["test/fixtures/template.html"] = function(obj) {
var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')}; obj || (obj = {});
with(obj||{}){ var __t, __p = '', __e = _.escape, __d = obj.obj || obj;
__p+='<head><title>'+ __p += '<head><title>' +
( title )+ ((__t = ( obj.title )) == null ? '' : __t) +
'</title></head>'; '</title></head>';
} return __p
return __p;
}; };

View File

@ -2,12 +2,11 @@ this["MyApp"] = this["MyApp"] || {};
this["MyApp"]["JST"] = this["MyApp"]["JST"] || {}; this["MyApp"]["JST"] = this["MyApp"]["JST"] || {};
this["MyApp"]["JST"]["Main"] = this["MyApp"]["JST"]["Main"] || {}; this["MyApp"]["JST"]["Main"] = this["MyApp"]["JST"]["Main"] || {};
this["MyApp"]["JST"]["Main"]["test/fixtures/template.html"] = function(obj){ this["MyApp"]["JST"]["Main"]["test/fixtures/template.html"] = function(obj) {
var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')}; obj || (obj = {});
with(obj||{}){ var __t, __p = '', __e = _.escape, __d = obj.obj || obj;
__p+='<head><title>'+ __p += '<head><title>' +
( title )+ ((__t = ( obj.title )) == null ? '' : __t) +
'</title></head>'; '</title></head>';
} return __p
return __p;
}; };

View File

@ -1,3 +1,3 @@
this["JST"] = this["JST"] || {}; this["JST"] = this["JST"] || {};
this["JST"]["test/fixtures/template.html"] = function(obj){var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};with(obj||{}){__p+='<head><title>'+( title )+'</title></head>';}return __p;}; this["JST"]["test/fixtures/template.html"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape, __d = obj.obj || obj;__p += '<head><title>' +((__t = ( obj.title )) == null ? '' : __t) +'</title></head>';return __p};

View File

@ -2,7 +2,7 @@ define(function(){
this["JST"] = this["JST"] || {}; this["JST"] = this["JST"] || {};
this["JST"]["test/fixtures/template.html"] = function(obj){var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};with(obj||{}){__p+='<head><title>'+( title )+'</title></head>';}return __p;}; this["JST"]["test/fixtures/template.html"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape, __d = obj.obj || obj;__p += '<head><title>' +((__t = ( obj.title )) == null ? '' : __t) +'</title></head>';return __p};
return this["JST"]; return this["JST"];
}); });

View File

@ -1,11 +1,10 @@
this["JST"] = this["JST"] || {}; this["JST"] = this["JST"] || {};
this["JST"]["test/fixtures/indent_template.html"] = function(obj){ this["JST"]["test/fixtures/indent_template.html"] = function(obj) {
var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')}; obj || (obj = {});
with(obj||{}){ var __t, __p = '', __e = _.escape, __d = obj.obj || obj;
__p+='<div>\n<div>\n<div>\n'+ __p += '<div>\n<div>\n<div>\n' +
( name )+ ((__t = ( obj.name )) == null ? '' : __t) +
'\n</div>\n</div>\n</div>'; '\n</div>\n</div>\n</div>';
} return __p
return __p;
}; };

View File

@ -1,9 +1,8 @@
this["JST"] = this["JST"] || {}; this["JST"] = this["JST"] || {};
this["JST"]["test/fixtures/it's-a-bad-filename.html"] = function(obj){ this["JST"]["test/fixtures/it's-a-bad-filename.html"] = function(obj) {
var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')}; obj || (obj = {});
with(obj||{}){ var __t, __p = '', __e = _.escape, __d = obj.obj || obj;
__p+='never name your file like this.'; __p += 'never name your file like this.';
} return __p
return __p;
}; };