Inject Markdown CLI tool that can be used with pre-commit hooks
Setup pre-commit Hook
This repository enables using inject-markdown as a pre-commit hook.
# .pre-commit-config.yaml
repos:
- repo: https://github.com/streetsidesoftware/inject-markdown-cli
rev: v3.1.2
hooks:
- id: inject-markdown
This repo also supports installing the inject-markdown-cli
directly from GitHub:
npm install -g git+https://github.com/streetsidesoftware/inject-markdown-cli
inject-markdown-cli --help
:
Usage: inject-markdown [options] <files...>
Inject file content into markdown files.
Arguments:
files Files to scan for injected content.
Options:
--no-must-find-files No error if files are not found.
--output-dir <dir> Output Directory
--cwd <dir> Current Directory
--clean Remove the injected content.
--verbose Verbose output.
--silent Only output errors.
--no-stop-on-errors Do not stop if an error occurs.
--write-on-error write the file even if an injection error occurs.
--color Force color.
--no-color Do not use color.
--no-summary Do not show the summary
--dry-run Process the files, but do not write.
-V, --version output the version number
-h, --help display help for command