1.0.1 • Published 5 years ago

template-substituter v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

Template-Substituter

Evaluates EJS templates reading data from environment variable and commandline arguments.

Installation

Global

npm i -g template-substituter

Local

npm i template-substituter --save

Usage

Assuming this template

Hello <%=myVariable%>

Template-substituter will try to:

  1. Find an commandline argument --myVariable
  2. 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.