1.0.3 • Published 6 years ago
ejs-html-cli v1.0.3
ejs-html-cli
ejs-html-cli
is EJS cli tool for compile HTML.
Installation
npm
$ npm install ejs-html-cli --save
Usage
Options:
--src source directory path. [string] [default: "src/ejs/**/*.ejs"]
--dest destination directory path. [string] [default: "dest"]
--options options json file path. (need setting root directory) [string] [default: "src/ejs/options.json"]
--personal personal key in options file. [string] [default: "personal"]
--version, -v show this version. [boolean]
--help, -h show this help. [boolean]
Example
$ ejs-html-cli --src src/ --dest dest/ --options src/options.json --personal personal
src/options.json
{
"common": {
"description": "dummy text."
},
"personal": {
"/index.ejs": {
"title": "Index"
},
"/about.ejs": {
"title": "About"
}
}
}
src/index.ejs
<html>
<h1><%= personal.title %></h1>
<p><%= common.description %></p>
</html>
<!--
<html>
<h1>Index</h1>
<p>dummy text.</p>
</html>
-->
src/about.ejs
<html>
<h1><%= personal.title %></h1>
<p><%= common.description %></p>
</html>
<!--
<html>
<h1>About</h1>
<p>dummy text.</p>
</html>
-->
For more in depth documentation see: https://isaxxx.com/works/ejs-html-cli/