Skip to content

jarstone/ejs-all

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ejs-all

Compile all ejs files in bulk.

Installation

npm i ejs-all -g

Features

  • Support watch mode
  • Support subdirectories
  • Keep directory structure from source and destination
  • In watch mode, only compile related files change
  • The result is beautified by default

Example

To compile all files run

  ejs-all --input=src/ejs --data=src/ejs/data.json --output=dist/html

For watch mode run

  ejs-all --input=src/ejs --data=src/ejs/data.json --output=dist/html --watch

Options

Parameter Description
--input=[dir] Required. Input directory
--data=[file.json] Required. Data file
--output=[dir] Required. Output directory
--watch Enable watch mode
--delay=[ms] The millisecond delay between a file change and task execution. Default: 200

FAQ

Can i change the ejs option ?

No, all options are default

The included files are also compiled, how to ignore it ?

For partial files, use an underscore for the first letter of the filename. Example: _sidebar.ejs

MIT License

About

Compile all ejs files in bulk

Resources

License

Stars

Watchers

Forks

Packages

No packages published