Command line tool to call the ssi
npm package
npm install ssi-cmd
Usage: ssi <source> <target> <files> [options]
Options:
-w, --watch <pattern> Watch for changes and recompile if any
-c, --clean [folder] Delete the target folder before compiling
-l, --loosened Support loosened spacing in ssi directives
-h, --help output usage information
This package is essentially a command-line interface to ssi, which allows you to use server-side include directives for simple includes and the like.
For a directory structured as follows:
root
|-- dist
|-- src
| |-- partials
| | |-- part1.html
| | |-- part2.html
| |-- page1.html
| |-- page2.html
|-- package.json
ssi src dist '/*.html'
Compile all html templates under /src
and any subfolders to an equivalent folder under /dist
(including partials in the above example)
ssi src dist '/**/*.html'
ssi src dist '/*.html' -c
ssi src dist '/*.html' -c '/*.html'
ssi src dist '/*.html' -w '/**/*.html'