Skip to content

shennan/ejs-on-command

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ejs-on-command

A command line interface for ejs with support for piping.

install

Install locally:

$ npm install ejs-on-command

Install globally:

$ npm install -g ejs-on-command

usage

Render ejs from stdout to stdout:

$ echo "<h1><%= 'hello world' %></h1>" | ejs-on-command

With options:

$ echo "<h1><%= message %></h1>" | ejs-on-command -j '{"message":"hello world"}'

With options from json file:

$ echo "<h1><%= message %></h1>" | ejs-on-command -j options.json

Write to a destination:

$ echo "<h1><%= message %></h1>" | ejs-on-command -d output.html

Read from a destination:

$ ejs-on-command -d output.html input.ejs

Or perhaps make it part of your build in your package.json:

"scripts":{
	
	"render": "ejs-on-command input.ejs > output.html"

}

roadmap

  • iron out problems with Windows
  • make use of other ejs features (cache etc)
  • build tests

About

A command line interface for ejs with support for piping.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published