GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - posthtml/posthtml-cli: CLI for PostHTML

BranchesTags
Open more actions menu

Latest commit

 

History

776 Commits
776 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
src
src
 
 
test
test
 
 
.babelrc
.babelrc
 
 
.clintonrc.json
.clintonrc.json
 
 
.editorconfig
.editorconfig
 
 
.eslintrc
.eslintrc
 
 
.gitignore
.gitignore
 
 
.huskyrc
.huskyrc
 
 
.lintstagedrc
.lintstagedrc
 
 
.npmignore
.npmignore
 
 
.npmrc
.npmrc
 
 
.nycrc
.nycrc
 
 
.posthtmlrc
.posthtmlrc
 
 
ava.config.js
ava.config.js
 
 
changelog.md
changelog.md
 
 
license
license
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
readme.md
readme.md
 
 

Repository files navigation

posthtml-cli

PostHTML сommand line interface

Actions StatusnodeNPM versionXO code styleCoveralls Status

npm downloadsnpm

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
    --skip -s        Skip parsing file
    --help -h        CLI Help
    --version -v     CLI Version

  Examples:
    $ posthtml input.html
    $ posthtml input.html -o output.html
    $ posthtml inputFolder/*.html !unicorn.html
    $ posthtml '**/*.html' '\!**/unicorn.html'
    $ posthtml '**/*.html' -s unicorn.html
    $ posthtml input-one.html input-two.html -o outputFolder
    $ 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 '**/*.html' -o outputFolder -a -r inputFolder

⚠️ Please note that when using patterns on the command line * and ! escaping of characters is necessary. When using as npm scripts, you only need to screen the pattern *. About the reasons

Options

{
  "root": "src",
  "input": "*.html",
  "output": "dist",
  "skip": ["skip.html", "file.html"],
  "options": {
    "sync": true,
    "directives": [{"name": "?php", "start": "<", "end": ">"}]
  },
  "plugins": {
    "posthtml-plugin-name": {
      "property": "value"
    }
  }
}

example config .posthtmlrc

About

CLI for PostHTML

Topics

cliposthtmlposthtml-runner

Resources

Readme
MIT license
Activity
Custom properties

Stars

28 stars

Watchers

4 watching

Forks

17 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.