🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

gulp-inline-template

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-inline-template - npm Package Compare versions

Comparing version
1.1.3
to
1.1.4
+2
-2
index.js

@@ -46,6 +46,6 @@ var through = require('through2');

case '__inline':
return JSON.stringify(fs.readFileSync(filePath).toString())
return JSON.stringify(fs.readFileSync(filePath).toString().replace(/\r\n/g,'\n'))
break;
case '__template':
return ejs.compile(fs.readFileSync(filePath).toString(),ejsConfig).toString().replace('function anonymous(locals, escape, include, rethrow','function(data,escape');
return ejs.compile(fs.readFileSync(filePath).toString().replace(/\r\n/g,'\n'),ejsConfig).toString().replace('function anonymous(locals, escape, include, rethrow','function(data,escape');
break;

@@ -52,0 +52,0 @@ }

{
"name": "gulp-inline-template",
"version": "1.1.3",
"version": "1.1.4",
"description": "Inline template into js file as string or function.",

@@ -15,3 +15,4 @@ "main": "index.js",

"gulp",
"inline"
"inline",
"template"
],

@@ -18,0 +19,0 @@ "author": "loviselu",

@@ -13,4 +13,4 @@ # gulp-inline-template

<ul class="ul">
<% for(var i=0;i<list.length;i++) { %>
<li><%=list[i]%></li>
<% for(var i=0;i<data.list.length;i++) { %>
<li><%=data.list[i]%></li>
<% } %>

@@ -25,3 +25,3 @@ </ul>

//after compile:
var a = "<ul class=\"ul\">\n\t<% for(var i=0;i<list.length;i++) { %>\n\t<li><%=list[i]%></li>\n\t<% } %>\n</ul>\n";
var a = "<ul class=\"ul\">\n\t<% for(var i=0;i<data.list.length;i++) { %>\n\t<li><%=data.list[i]%></li>\n\t<% } %>\n</ul>\n";
var b = function(data,escape

@@ -28,0 +28,0 @@ /**/) {