Prompt for unread doc changes.
- 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.
-
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 packagertf-readme
).Also check out the
.rtfrrc
generated for common options. -
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
. -
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"] }
-
Now, if anyone else (using VSCode with the extension) opened a file matched by
**
(obviously any file except for those ignored byignore
config option in.rtfrrc
), they will get prompted to read the f***ing README (with diff):
-
Install npm package:
yarn add -D rtf-readme # or npm install -D rtf-readme
-
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.
MIT License.