https://github.com/streetsidesoftware/inject-markdown-cli
Inject Markdown CLI tool that can be used with pre-commit hooks
https://github.com/streetsidesoftware/inject-markdown-cli
Last synced: 3 months ago
JSON representation
Inject Markdown CLI tool that can be used with pre-commit hooks
- Host: GitHub
- URL: https://github.com/streetsidesoftware/inject-markdown-cli
- Owner: streetsidesoftware
- License: mit
- Created: 2024-11-09T10:39:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-29T12:06:25.000Z (12 months ago)
- Last Synced: 2024-12-29T13:20:08.830Z (12 months ago)
- Language: JavaScript
- Size: 41 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Inject Markdown CLI
Inject Markdown CLI tool that can be used with pre-commit hooks
## Setup [pre-commit](https://pre-commit.com) Hook
This repository enables using [inject-markdown](https://github.com/streetsidesoftware/inject-markdown) as a [pre-commit](https://pre-commit.com) hook.
```yaml
# .pre-commit-config.yaml
repos:
- repo: https://github.com/streetsidesoftware/inject-markdown-cli
rev: v3.1.2
hooks:
- id: inject-markdown
```
## Install from GitHub
This repo also supports installing the `inject-markdown-cli` directly from GitHub:
```
npm install -g git+https://github.com/streetsidesoftware/inject-markdown-cli
```
## Usage
`inject-markdown-cli --help`:
```
Usage: inject-markdown [options]
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 Output Directory
--cwd 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
```