ejsc <file> [output] [data]
ejsc myPage.html.ejs
- Compiles myPage.html.ejs to myPage.html.
ejsc template.ejs compiled.html
- Compiles template.ejs to compiled.html.
ejsc myPage.ejs myPage.html "{ \"value\": 123 }"
- Compiles myPage.ejs passing the specified object as global context.
ejsc file1.txt.ejs output.txt "{ \"something\": \"from arguments\" }"
Hello, World!
This is <%- filename %>, something = <%- something %>
<%- compile('file2.txt.ejs', { something: "test" }) %>
This is <%- filename %>, something = <%- something %>
Hello, World!
This is file1.txt.ejs, something = from arguments
This is file2.txt.ejs, something = test
Copyright © 2018 Fabio Iotti. ejsc is released under the terms of the MIT License.