@wayowe/prettyhtml-quick

0.10.3 • Public • Published

prettyhtml-quick

Runs Prettyhtml on your changed (based on Git) files.

Example:

prettyhtml-quick
🔍  Finding changed files since git revision 2eb4337.
🎯  Found 1 changed file.
    ☝  printWidth: 80, tabWidth: 2
✍️  Fixing up test.html.
✅  Everything is awesome!

Install

npm install --save-dev @wayowe/prettyhtml-quick

Usage

With npx: (No install required)

npx @wayowe/prettyhtml-quick

Pre-Commit Hook

You can run prettyhtml-quick as a pre-commit hook using husky.

yarn add --dev husky

In package.json's "scripts" section, add:

"precommit": "prettyhtml-quick"

CLI Flags

-s --staged

Only staged files will be formatted, and they will be re-staged after formatting.

Formatter options

We use prettier resolveConfig to indentify your tabWidth and printWidth. It will fallback to .editorconfig.

Dependencies (6)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @wayowe/prettyhtml-quick

    Weekly Downloads

    0

    Version

    0.10.3

    License

    MIT

    Unpacked Size

    7.06 kB

    Total Files

    5

    Last publish

    Collaborators

    • suiga