# reagan

> compare code blocks in markdown documents to source files hosted on GitHub

Latest version **0.0.8** (published 2016-09-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install reagan
pnpm add reagan
yarn add reagan
bun add reagan
```

Provides the command `reagan`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2016-09-05 |
| First published | 2016-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 6.4.x |
| Dependencies | 7 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Christopher Bennage |
| Maintainers | bennage |
| Keywords | markdown, md, code samples, github |

## Links

- npm: https://www.npmjs.com/package/reagan
- Repository: https://github.com/bennage/reagan
- Homepage: https://github.com/bennage/reagan#readme
- Issues: https://github.com/bennage/reagan/issues
- npm.io page: https://npm.io/package/reagan

## Dependencies (7)

- [mz](https://npm.io/package/mz.md) ^2.4.0
- [ora](https://npm.io/package/ora.md) ^0.3.0
- [diff](https://npm.io/package/diff.md) ^3.0.0
- [glob](https://npm.io/package/glob.md) ^7.0.6
- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [progress](https://npm.io/package/progress.md) ^1.1.8
- [commander](https://npm.io/package/commander.md) ^2.9.0

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 0.0.8 (latest) — 2016-09-05
- 0.0.7 — 2016-09-03
- 0.0.6 — 2016-09-02
- 0.0.5 — 2016-09-02
- 0.0.4 — 2016-09-02
- 0.0.3 — 2016-09-02
- 0.0.2 — 2016-08-31
- 0.0.1 — 2016-08-31
- 0.0.0 — 2016-08-31

## README

# Reagan

<a title="By tcm (screenshots from trailer) [Public domain], via Wikimedia Commons" href="https://commons.wikimedia.org/wiki/File%3ARonald_Reagan_in_The_Bad_Man_(1941).png"><img width="256" alt="Ronald Reagan in The Bad Man (1941)" src="https://upload.wikimedia.org/wikipedia/commons/1/1e/Ronald_Reagan_in_The_Bad_Man_%281941%29.png"/></a>

Reagan is a tool for verifying that code samples embedded in a markdown document are in sync with the GitHub-hosted source files.

```
npm i -g reagan
```

Reagan will scan markdown file for code blocks preceded by a special HTML comments:

```
    <!-- source: http://github.com/your/repo/file.code#L10-L20 -->

    ```language
        some cool snippet
    ```
```

Reagan will compare the code block to the lines identified in the comment.
By default, Reagan will scan the current directory for files with an md extension.

```
  Usage: reagan [options]

  Options:

    -h, --help             output usage information
    -V, --version          output the version number
    -f, --folder [folder]  the folder to search
    -i, --include [glob]   the pattern to match (defaults to **/*.md)
    -u, --update           attempt to update local files
    --strict               enforce exact matches
```

---
_Source: https://npm.io/package/reagan · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
