gulp-inline-template
Inline template into js file as string or function.
Usage
use __inline(filePath) to inline template to js file as string (Only relative path support);
use __template(filePath) to inline ejs template to js file as function (Only relative path support);
Example
<!-- content.tpl --> <% for(var i=0;i <%=data.list[i]%> <% } %>
var a = var b = //after compile: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 {escape = escape || { return markup == undefined ? '' : Stringmarkup ;};var _ENCODE_HTML_RULES = "&": "&" "<": "<" ">": ">" '"': """ "'": "'" _MATCH_HTML = /[&<>'"]/g; { return _ENCODE_HTML_RULESc || c;};; var __output = __append = __outputpush; ; ; forvar i=0;i<datalistlength;i++ ; ; ; ; ; return __output; }