fis-parser-velocity-cms
v0.0.2
Published
a parser plugin for fis to compile velocity with html
Downloads
12
Readme
fis-parser-html-ejs
a parser plugin for fis to compile html file with ejs
usage
install
npm install -g fis-parser-html-ejs
configure
//tell fis that parse `.html` file by using `fis-parser-html-ejs` plugin fis.config.set('modules.parser.html', 'html-ejs');
inline html file
source:
/********************************** * index.html content: ********************************** <ul> <script type="text/ejs" data-json="config/data.json"> <% for(var i=0;i<list.length;i++){ %><li><img src="<%=list[i]%>" /></li><% } %> </script> </ul> **********************************/
/********************************** * src/config/data.json content: ********************************** { "list":["img/1.jpg","img/2.jpg"] } **********************************/
release:
/********************************** * index.html content: ********************************** <ul> <li><img src="img/1.jpg" /></li> <li><img src="img/2.jpg" /></li> </ul> **********************************/