Skip to content

Commit 792baa5

Browse files
committed
init
0 parents  commit 792baa5

File tree

15 files changed

+2321
-0
lines changed

15 files changed

+2321
-0
lines changed

.github/workflows/main.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
typecheck:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v5
14+
- uses: jdx/mise-action@v3
15+
with:
16+
mise_toml: |
17+
[tools]
18+
pnpm = "latest"
19+
- run: pnpm install
20+
- run: pnpm run typecheck
21+
test:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v5
25+
- uses: jdx/mise-action@v3
26+
with:
27+
mise_toml: |
28+
[tools]
29+
pnpm = "latest"
30+
- run: pnpm install
31+
- run: pnpm run test

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
*.log
4+
.DS_Store

.vscode/settings.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"editor.defaultFormatter": "biomejs.biome",
3+
"[javascript]": {
4+
"editor.defaultFormatter": "biomejs.biome"
5+
},
6+
"[javascriptreact]": {
7+
"editor.defaultFormatter": "biomejs.biome"
8+
},
9+
"[typescript]": {
10+
"editor.defaultFormatter": "biomejs.biome"
11+
},
12+
"[typescriptreact]": {
13+
"editor.defaultFormatter": "biomejs.biome"
14+
},
15+
"[css]": {
16+
"editor.defaultFormatter": "biomejs.biome"
17+
}
18+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 mehm8128
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# rehype-toc
2+
3+
## Development
4+
5+
- Install dependencies:
6+
7+
```bash
8+
pnpm install
9+
```
10+
11+
- Run the unit tests:
12+
13+
```bash
14+
pnpm run test
15+
```
16+
17+
- Build the library:
18+
19+
```bash
20+
pnpm run build
21+
```

biome.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": false
10+
},
11+
"formatter": {
12+
"enabled": true,
13+
"indentStyle": "tab"
14+
},
15+
"linter": {
16+
"enabled": true,
17+
"rules": {
18+
"recommended": true,
19+
"correctness": {
20+
"noUnusedImports": "error"
21+
}
22+
}
23+
},
24+
"javascript": {
25+
"formatter": {
26+
"quoteStyle": "single",
27+
"semicolons": "asNeeded",
28+
"arrowParentheses": "asNeeded",
29+
"trailingCommas": "none"
30+
}
31+
},
32+
"assist": {
33+
"enabled": true,
34+
"actions": {
35+
"source": {
36+
"organizeImports": "on"
37+
}
38+
}
39+
}
40+
}

mise.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tools]
2+
node = "lts"

package.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "rehype-toc",
3+
"version": "1.0.0",
4+
"type": "module",
5+
"repository": {
6+
"type": "git",
7+
"url": "git+ssh://[email protected]/mehm8128/rehype-toc.git"
8+
},
9+
"homepage": "https://github.com/mehm8128/rehype-toc",
10+
"license": "MIT",
11+
"description": "rehype plugin to generate a collapsable table of contents",
12+
"keywords": [
13+
"rehype",
14+
"toc",
15+
"table of contents"
16+
],
17+
"author": "mehm8128 <[email protected]>",
18+
"files": [
19+
"dist",
20+
"README.md",
21+
"LICENSE",
22+
"package.json"
23+
],
24+
"main": "./dist/index.js",
25+
"module": "./dist/index.js",
26+
"types": "./dist/index.d.ts",
27+
"exports": {
28+
".": "./dist/index.js",
29+
"./package.json": "./package.json"
30+
},
31+
"scripts": {
32+
"build": "tsdown",
33+
"dev": "tsdown --watch",
34+
"test": "vitest",
35+
"typecheck": "tsc --noEmit"
36+
},
37+
"devDependencies": {
38+
"@biomejs/biome": "^2.2.4",
39+
"@types/hast": "^3.0.4",
40+
"rehype": "^13.0.2",
41+
"tsdown": "^0.11.9",
42+
"typescript": "^5.8.3",
43+
"vitest": "^3.1.3"
44+
},
45+
"dependencies": {
46+
"unist-util-visit": "^5.0.0"
47+
}
48+
}

0 commit comments

Comments
 (0)