Evaluates EJS templates reading data from environment variable and commandline arguments.
npm i -g template-substituter
npm i template-substituter --save
Assuming this template
Hello <%=myVariable%>
Template-substituter will try to:
- Find an commandline argument --myVariable
- Find an environment variable myVariable
Note that all variable are camelized. MY-VARIABLE, MY_VARIABLE, my-variable and myVariable are all considered the same.
Files that end with .ejs will be evaluated into a version without this suffix.
Files not ending with .ejs will be evaluated in place.