fis-parser-ejs
a parser plugin for fis to compile ejs file
usage
-
install
npm install -g fis-parser-ejs -
configure
//tell fis that `.ejs` is a js filefisconfig;//tell fis that parse `.ejs` file by using `fis-parser-ejs` pluginfisconfig;//set options if you need//@see https://github.com/visionmedia/ejs#optionsfisconfig; -
inline ejs file
-
source:
/*********************************** tpl.ejs content:**********************************<% if (user) { %><h2><%= user.name %></h2><% } %>**********************************/var tpl = ;var data =user :name : 'foo';var html = ;console; -
release:
var tpl = {{var r=ns=Mathc=Mathi=r;throw epath=aemessage=a||"ejs"+":"+t+"\n"+i+"\n\n"+emessagee}escape=escape||{return Stringe};var __stack=lineno:1input:"<% if (user) { %>\n <h2><%= user.name %></h2>\n<% } %>"filename:"a.ejs";tryvar buf=;withlocals||{}!{buf__stacklineno=1user&&buf__stacklineno=3buf};return bufcatcherr}0;var data =user :name : 'foo';var html = ;console;
-