https://github.com/renatorib/comment-hole
Replace file content within commented tags
https://github.com/renatorib/comment-hole
generator readme replacer
Last synced: 27 days ago
JSON representation
Replace file content within commented tags
- Host: GitHub
- URL: https://github.com/renatorib/comment-hole
- Owner: renatorib
- Created: 2024-08-08T23:19:21.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-08-09T00:18:17.000Z (9 months ago)
- Last Synced: 2025-02-23T05:34:44.492Z (2 months ago)
- Topics: generator, readme, replacer
- Language: TypeScript
- Homepage:
- Size: 59.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Comment Hole
Replace file content within commented tag holes
## Getting started
### `1` Create a hole in your file with comment tags
`README.md`:
```md
## OptionsWe support following options:
```
### `2` Run `replaceTag`
```js
// scripts/update-readme.js
import { replaceTag } from "comment-hole";replaceTag("README.md", {
options: "<>",
});
``````sh
node scripts/update-readme.js
```### `3` Done! File will be overwritten
```diff
## OptionsWe support following options:
+<>
+```
> [!NOTE]
> Whenever you run `replaceTag` **ANY** content between the hole tags will be replaced.## Supported Extensions
For now we only support `.md` and `.html`.
PRs are welcome!