Tweak expected output w/r/t lodash changes; add templateSetting.variable to test configs
This commit is contained in:
parent
44f5566772
commit
9f4671ed41
28
Gruntfile.js
28
Gruntfile.js
@ -31,12 +31,20 @@ module.exports = function(grunt) {
|
||||
// Configuration to be run (and then tested).
|
||||
jst: {
|
||||
compile: {
|
||||
options: {
|
||||
templateSettings: {
|
||||
variable: 'obj'
|
||||
}
|
||||
},
|
||||
files: {
|
||||
"tmp/jst.js": ["test/fixtures/template.html"]
|
||||
}
|
||||
},
|
||||
pretty_amd: {
|
||||
options: {
|
||||
templateSettings: {
|
||||
variable: 'obj'
|
||||
},
|
||||
prettify: true,
|
||||
amdWrapper: true
|
||||
},
|
||||
@ -46,6 +54,9 @@ module.exports = function(grunt) {
|
||||
},
|
||||
prettify: {
|
||||
options: {
|
||||
templateSettings: {
|
||||
variable: 'obj'
|
||||
},
|
||||
prettify: true
|
||||
},
|
||||
files: {
|
||||
@ -54,6 +65,9 @@ module.exports = function(grunt) {
|
||||
},
|
||||
amd_wrapper: {
|
||||
options: {
|
||||
templateSettings: {
|
||||
variable: 'obj'
|
||||
},
|
||||
amdWrapper:true
|
||||
},
|
||||
files: {
|
||||
@ -61,12 +75,20 @@ module.exports = function(grunt) {
|
||||
}
|
||||
},
|
||||
uglyfile: {
|
||||
options: {
|
||||
templateSettings: {
|
||||
variable: 'obj'
|
||||
},
|
||||
},
|
||||
files: {
|
||||
"tmp/uglyfile.js": ["test/fixtures/*bad-filename*"]
|
||||
}
|
||||
},
|
||||
ns_nested: {
|
||||
options: {
|
||||
templateSettings: {
|
||||
variable: 'obj'
|
||||
},
|
||||
namespace: "MyApp.JST.Main"
|
||||
},
|
||||
files: {
|
||||
@ -75,6 +97,9 @@ module.exports = function(grunt) {
|
||||
},
|
||||
ns_nested_this: {
|
||||
options: {
|
||||
templateSettings: {
|
||||
variable: 'obj'
|
||||
},
|
||||
namespace: "this.MyApp.JST.Main"
|
||||
},
|
||||
files: {
|
||||
@ -83,6 +108,9 @@ module.exports = function(grunt) {
|
||||
},
|
||||
process_content: {
|
||||
options: {
|
||||
templateSettings: {
|
||||
variable: 'obj'
|
||||
},
|
||||
processContent: function (src) {
|
||||
return src.replace(/(^\s+|\s+$)/gm, '');
|
||||
}
|
||||
|
@ -3,8 +3,7 @@ define(function(){
|
||||
this["JST"] = this["JST"] || {};
|
||||
|
||||
this["JST"]["test/fixtures/template.html"] = function(obj) {
|
||||
obj || (obj = {});
|
||||
var __t, __p = '', __e = _.escape, __d = obj.obj || obj;
|
||||
var __t, __p = '', __e = _.escape;
|
||||
__p += '<head><title>' +
|
||||
((__t = ( obj.title )) == null ? '' : __t) +
|
||||
'</title></head>';
|
||||
|
@ -1,8 +1,7 @@
|
||||
this["JST"] = this["JST"] || {};
|
||||
|
||||
this["JST"]["test/fixtures/template.html"] = function(obj) {
|
||||
obj || (obj = {});
|
||||
var __t, __p = '', __e = _.escape, __d = obj.obj || obj;
|
||||
var __t, __p = '', __e = _.escape;
|
||||
__p += '<head><title>' +
|
||||
((__t = ( obj.title )) == null ? '' : __t) +
|
||||
'</title></head>';
|
||||
|
@ -3,8 +3,7 @@ this["MyApp"]["JST"] = this["MyApp"]["JST"] || {};
|
||||
this["MyApp"]["JST"]["Main"] = this["MyApp"]["JST"]["Main"] || {};
|
||||
|
||||
this["MyApp"]["JST"]["Main"]["test/fixtures/template.html"] = function(obj) {
|
||||
obj || (obj = {});
|
||||
var __t, __p = '', __e = _.escape, __d = obj.obj || obj;
|
||||
var __t, __p = '', __e = _.escape;
|
||||
__p += '<head><title>' +
|
||||
((__t = ( obj.title )) == null ? '' : __t) +
|
||||
'</title></head>';
|
||||
|
@ -1,3 +1,3 @@
|
||||
this["JST"] = this["JST"] || {};
|
||||
|
||||
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};
|
||||
this["JST"]["test/fixtures/template.html"] = function(obj) {var __t, __p = '', __e = _.escape;__p += '<head><title>' +((__t = ( obj.title )) == null ? '' : __t) +'</title></head>';return __p};
|
@ -2,7 +2,7 @@ define(function(){
|
||||
|
||||
this["JST"] = this["JST"] || {};
|
||||
|
||||
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};
|
||||
this["JST"]["test/fixtures/template.html"] = function(obj) {var __t, __p = '', __e = _.escape;__p += '<head><title>' +((__t = ( obj.title )) == null ? '' : __t) +'</title></head>';return __p};
|
||||
|
||||
return this["JST"];
|
||||
});
|
@ -1,8 +1,7 @@
|
||||
this["JST"] = this["JST"] || {};
|
||||
|
||||
this["JST"]["test/fixtures/indent_template.html"] = function(obj) {
|
||||
obj || (obj = {});
|
||||
var __t, __p = '', __e = _.escape, __d = obj.obj || obj;
|
||||
var __t, __p = '', __e = _.escape;
|
||||
__p += '<div>\n<div>\n<div>\n' +
|
||||
((__t = ( obj.name )) == null ? '' : __t) +
|
||||
'\n</div>\n</div>\n</div>';
|
||||
|
@ -1,8 +1,7 @@
|
||||
this["JST"] = this["JST"] || {};
|
||||
|
||||
this["JST"]["test/fixtures/it's-a-bad-filename.html"] = function(obj) {
|
||||
obj || (obj = {});
|
||||
var __t, __p = '', __e = _.escape, __d = obj.obj || obj;
|
||||
var __t, __p = '', __e = _.escape;
|
||||
__p += 'never name your file like this.';
|
||||
return __p
|
||||
};
|
2
test/fixtures/indent_template.html
vendored
2
test/fixtures/indent_template.html
vendored
@ -1,7 +1,7 @@
|
||||
<div>
|
||||
<div>
|
||||
<div>
|
||||
<%= name %>
|
||||
<%= obj.name %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
2
test/fixtures/template.html
vendored
2
test/fixtures/template.html
vendored
@ -1 +1 @@
|
||||
<head><title><%= title %></title></head>
|
||||
<head><title><%= obj.title %></title></head>
|
Loading…
Reference in New Issue
Block a user