Skip to content

About

CLI for PostHTML

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

posthtml-cli

PostHTML сommand line interface

Actions StatusnodeNPM versionDependency StatusXO code styleCoveralls Status

npm downloadsnpmPackage Quality

Install

$ npm install --global posthtml-cli

Note: This project is compatible with node v10+

Usage

$ posthtml --help

  Usage:
    $ posthtml <patterns>

  Options:
    --output -o      Output File or Folder
    --config -c      Path to config file
    --use -u         PostHTML plugin name
    --root -r        Mirror the directory structure relative to this path in the output directory(default: .)
    --allInOutput -a Save the nesting structure for output
    --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 -a
    $ posthtml inputFolder/**/*.html -o outputFolder -a -r inputFolder

Options

{
  "input": "src/*.html",
  "output": "dist",
  "plugins": {
    "posthtml-plugin-name": {
      "property": "value"
    }
  }
};

example config .posthtmlrc

About

CLI for PostHTML

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages