Skip to content

Commit

Permalink
Merge pull request #2 from mobilusoss/issue-1
Browse files Browse the repository at this point in the history
close #1
  • Loading branch information
mohemohe authored Nov 11, 2019
2 parents 719a961 + 8937694 commit 207ed0e
Show file tree
Hide file tree
Showing 12 changed files with 3,359 additions and 11 deletions.
3,348 changes: 3,348 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"dependencies": {
"chalk": "^1.0.0",
"lodash": "^2.4.1"
"lodash": "^4.17.15"
},
"devDependencies": {
"grunt": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion tasks/jst.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module.exports = function(grunt) {
var compiled, filename;

try {
compiled = _.template(src, false, options.templateSettings).source;
compiled = _.template(src, options.templateSettings).source;
} catch (e) {
grunt.log.error(e);
grunt.fail.warn('JST ' + chalk.cyan(filepath) + ' failed to compile.');
Expand Down
2 changes: 1 addition & 1 deletion test/expected/amd_wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ define(function(){
this["JST"] = this["JST"] || {};

this["JST"]["test/fixtures/template.html"] = function(obj) {
var __t, __p = '', __e = _.escape;
var __t, __p = '';
__p += '<head><title>' +
((__t = ( obj.title )) == null ? '' : __t) +
'</title></head>';
Expand Down
2 changes: 1 addition & 1 deletion test/expected/amd_wrapper_no_ns.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
define(function(){

return function(obj) {
var __t, __p = '', __e = _.escape;
var __t, __p = '';
__p += '<head><title>' +
((__t = ( obj.title )) == null ? '' : __t) +
'</title></head>';
Expand Down
2 changes: 1 addition & 1 deletion test/expected/jst.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
this["JST"] = this["JST"] || {};

this["JST"]["test/fixtures/template.html"] = function(obj) {
var __t, __p = '', __e = _.escape;
var __t, __p = '';
__p += '<head><title>' +
((__t = ( obj.title )) == null ? '' : __t) +
'</title></head>';
Expand Down
2 changes: 1 addition & 1 deletion test/expected/local_scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ this["JST"] = this["JST"] || {};

this["JST"]["test/fixtures/template_local_scope.html"] = function(obj) {
obj || (obj = {});
var __t, __p = '', __e = _.escape;
var __t, __p = '';
with (obj) {
__p += '<head><title>' +
((__t = ( title )) == null ? '' : __t) +
Expand Down
2 changes: 1 addition & 1 deletion test/expected/ns_nested.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +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) {
var __t, __p = '', __e = _.escape;
var __t, __p = '';
__p += '<head><title>' +
((__t = ( obj.title )) == null ? '' : __t) +
'</title></head>';
Expand Down
2 changes: 1 addition & 1 deletion test/expected/pretty.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
this["JST"] = this["JST"] || {};

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};
this["JST"]["test/fixtures/template.html"] = function(obj) {var __t, __p = '';__p += '<head><title>' +((__t = ( obj.title )) == null ? '' : __t) +'</title></head>';return __p};
2 changes: 1 addition & 1 deletion test/expected/pretty_amd.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ define(function(){

this["JST"] = this["JST"] || {};

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};
this["JST"]["test/fixtures/template.html"] = function(obj) {var __t, __p = '';__p += '<head><title>' +((__t = ( obj.title )) == null ? '' : __t) +'</title></head>';return __p};

return this["JST"];

Expand Down
2 changes: 1 addition & 1 deletion test/expected/process_content.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
this["JST"] = this["JST"] || {};

this["JST"]["test/fixtures/indent_template.html"] = function(obj) {
var __t, __p = '', __e = _.escape;
var __t, __p = '';
__p += '<div>\n<div>\n<div>\n' +
((__t = ( obj.name )) == null ? '' : __t) +
'\n</div>\n</div>\n</div>';
Expand Down
2 changes: 1 addition & 1 deletion test/expected/uglyfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
this["JST"] = this["JST"] || {};

this["JST"]["test/fixtures/it's-a-bad-filename.html"] = function(obj) {
var __t, __p = '', __e = _.escape;
var __t, __p = '';
__p += 'never name your file like this.';
return __p
};

0 comments on commit 207ed0e

Please sign in to comment.