compile-env-templates
v0.0.1
Published
Compile EJS templates referencing environment variables
Downloads
3
Maintainers
Readme
compile-env-templates
CLI for compiling EJS templates referencing environment variables.
Access process.ENV
in templates as env
:
// environment.ejs
module.exports = {
secret: <%= env.MY_SECRET %>
};
$ MY_SECRET=secret
$ compile-env-templates environment.ejs
To load environment variables from a file (using dotenv):
$ compile-env-templates --env path/to/.env environment.ejs
To give compiled files a custom extension:
$ compile-env-templates --ext ts environment.ejs