Newton's Principia Mathematica
    Wondering what’s next for npm?Check out our public roadmap! »

    rehype-cli

    10.0.0 • Public • Published

    rehype-cli

    Build Coverage Downloads Sponsors Backers Chat

    Command line interface for rehype.

    Sponsors



    🥇 Vercel


    🥇 Gatsby


    🥇 Netlify


    Holloway




    You?

    Read more about the unified collective on Medium »

    Install

    npm:

    npm install rehype-cli

    Use

    # Minify `index.html` with `rehype-preset-minify`: 
    $ rehype index.html --use preset-minify --output

    CLI

    See unified-args, which provides the interface, for more information on all available options.

    Usage: rehype [options] [path | glob ...]
     
      CLI to process HTML with rehype using plugins
     
    Options:
     
      -h  --help                output usage information
      -v  --version             output version number
      -o  --output [path]       specify output location
      -r  --rc-path <path>      specify configuration file
      -i  --ignore-path <path>  specify ignore file
      -s  --setting <settings>  specify settings
      -e  --ext <extensions>    specify extensions
      -u  --use <plugins>       use plugins
      -w  --watch               watch for changes and reprocess
      -q  --quiet               output only warnings and errors
      -S  --silent              output only errors
      -f  --frail               exit with 1 on warnings
      -t  --tree                specify input and output as syntax tree
          --report <reporter>   specify reporter
          --file-path <path>    specify path to process as
          --tree-in             specify input as syntax tree
          --tree-out            output syntax tree
          --[no-]stdout         specify writing to stdout (on by default)
          --[no-]color          specify color in report (on by default)
          --[no-]config         search for configuration files (on by default)
          --[no-]ignore         search for ignore files (on by default)
     
    Examples:
     
      # Process `input.html`
      $ rehype input.html -o output.html
     
      # Pipe
      $ rehype < input.html > output.html
     
      # Rewrite all applicable files
      $ rehype . -o

    Security

    As rehype works on HTML, and improper use of HTML can open you up to a cross-site scripting (XSS) attack, use of rehype can also be unsafe. Use rehype-sanitize to make the tree safe.

    Contribute

    See contributing.md in rehypejs/.github for ways to get started. See support.md for ways to get help. Ideas for new plugins and tools can be posted in rehypejs/ideas.

    A curated list of awesome rehype resources can be found in awesome rehype.

    This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

    License

    MIT © Titus Wormer

    Install

    npm i rehype-cli

    DownloadsWeekly Downloads

    62

    Version

    10.0.0

    License

    MIT

    Unpacked Size

    7.47 kB

    Total Files

    3

    Last publish

    Collaborators

    • avatar
    • avatar