Replace Underscore.js with Lo-Dash

This commit is contained in:
Igor Hlina 2012-12-31 21:06:55 +01:00
parent 6aa2b5e8d1
commit c39f2c9c37
9 changed files with 33 additions and 38 deletions

View File

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

View File

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

View File

@ -2,14 +2,13 @@ define(function(){
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 )+
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 __p
};
return this["JST"];

View File

@ -1,11 +1,10 @@
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 )+
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 __p
};

View File

@ -2,12 +2,11 @@ this["MyApp"] = this["MyApp"] || {};
this["MyApp"]["JST"] = this["MyApp"]["JST"] || {};
this["MyApp"]["JST"]["Main"] = this["MyApp"]["JST"]["Main"] || {};
this["MyApp"]["JST"]["Main"]["test/fixtures/template.html"] = function(obj){
var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};
with(obj||{}){
__p+='<head><title>'+
( title )+
this["MyApp"]["JST"]["Main"]["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 __p
};

View File

@ -1,3 +1,3 @@
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"]["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"];
});

View File

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

View File

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