Compile all ejs files in bulk.
npm i ejs-all -g
- 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
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
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 |
No, all options are default
For partial files, use an underscore for the first letter of the filename. Example: _sidebar.ejs