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

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

Awesome Lists containing this project

README

        

Comment Hole



npm package

Replace file content within commented tag holes




## Getting started

### `1` Create a hole in your file with comment tags

`README.md`:

```md
## Options

We 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
## Options

We 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!