An open API service indexing awesome lists of open source software.

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

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
```