Skip to content

digshare/rtf-readme

Repository files navigation

📝 rtf-README

Prompt for unread doc changes.

Features

  • VSCode Extension that prompt for unread doc changes.
  • CLI command that checks if any recent changes are made without the author having read related docs.

Getting Started with VSCode

  1. Install VSCode Extension and create config file using command rtf-README: Create Config File.

    You will be asked to enter an rtf-README server address (defaults to https://rtfr.mufan.com) for storing commit hashes of READMEs that users read.

    You can also setup your own server using CLI rtfr-serve (provided by npm package rtf-readme).

    Also check out the .rtfrrc generated for common options.

  2. Edit a README.md file and append the following code:

    <!-- README ** -->

    Or in multiline to support multiple patterns.

    <!--
      README
        **
    -->

    The pattern is relative to the markdown file, or / relative to .rtfrrc.

  3. Add enverse.vscode-rtf-readme to VSCode Recommended Extensions (.vscode/extensions.json) so that your teammate would not forget to install the extension.

    {
      "recommendations": ["enverse.vscode-rtf-readme"]
    }
  4. Now, if anyone else (using VSCode with the extension) opened a file matched by ** (obviously any file except for those ignored by ignore config option in .rtfrrc), they will get prompted to read the f***ing README (with diff):

    rtf-README prompt

Getting Started with CLI

  1. Install npm package:

    yarn add -D rtf-readme
    # or
    npm install -D rtf-readme
  2. Check the docs reading status:

    yarn rtfr check
    # or
    npx rtfr check

    You can add this to your CI/CD flow to make sure everyone read docs they are expected to read.

License

MIT License.