PostHTML сommand line interface
$ npm install --global posthtml-cli
Note: This project is compatible with node v10+
$ posthtml --help
Usage:
$ posthtml <patterns>
Options:
--output -o Output File or Folder
--config -c Path to config file
--use -u PostHTML plugin name
--help -h CLI Help
--version -v CLI Version
Examples:
$ posthtml input.html
$ posthtml input.html -o output.html
$ posthtml inputFolder/*.html !unicorn.html
$ posthtml input.html -o output.html -c posthtml.js
$ posthtml input.html -o output.html -u posthtml-bem --posthtml-bem.elemPrefix __
$ posthtml inputFolder/*.html -o outputFolder
$ posthtml inputFolder/**/*.html -o outputFolder
{
"input": "src/*.html",
"output": "dist",
"plugins": {
"posthtml-plugin-name": {
"property": "value"
}
}
};
example config
.posthtmlrc