Skip to content

Commit 53a879c

Browse files
clean up package.json, add husky for pre push hook, add lint + link checker + generate smart contract docs to CI
1 parent 09e747f commit 53a879c

File tree

9 files changed

+59
-738
lines changed

9 files changed

+59
-738
lines changed

.github/workflows/master.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,20 @@ jobs:
2626
with:
2727
bun-version: "1.3.0"
2828
- run: bun install
29+
- name: Lint markdown
30+
run: bun run lint:markdown
31+
- name: Check links
32+
run: bun run check:links
33+
- name: Generate smart contract docs
34+
run: bun run script:generate-smart-contract-docs
2935
- name: Build Docs
3036
run: bunx vocs build
3137
- name: Upload Docs to Pages
32-
uses: actions/upload-pages-artifact@v4
38+
uses: actions/upload-artifact@v4
3339
with:
3440
name: github-pages
35-
path: src/dist
41+
path: src/dist/
42+
include-hidden-files: true
3643

3744
test-rust-code:
3845
runs-on: ubuntu-latest

.husky/pre-push

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
bun run lint:markdown
2+
bun run check:links
3+
bun run script:generate-smart-contract-docs
4+
bun run build

bun.lock

Lines changed: 39 additions & 323 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,26 @@
55
"scripts": {
66
"build": "vocs build",
77
"dev": "vocs dev",
8-
"check-links": "bun ./scripts/check-links.ts",
9-
"check-markdown": "remark . --quiet --ignore-pattern 'src/pages/developers/smart-contracts/**'",
10-
"check": "run-p check-markdown check-links",
11-
"ci": "bun run build && bun run check",
12-
"format-markdown": "remark . --output --use sort-definitions --use remark-lint-match-punctuation --use remark-lint-no-url-trailing-slash",
13-
"generate-link-previews": "bun scripts/generate-link-previews.ts",
14-
"generate-smart-contracts-docs": "cd .. && rm -rf documentation/src/pages/tmp && forge doc --build --out documentation/src/pages/tmp && cd documentation && bun ./scripts/process-forge-docs.ts && rm -rf src/pages/tmp",
15-
"preview": "vocs preview"
8+
"format:markdown": "remark ./src/pages --output --use remark-lint-match-punctuation --use remark-lint-no-url-trailing-slash",
9+
"lint:markdown": "remark ./src/pages --ignore-pattern 'src/pages/developers/smart-contracts/**'",
10+
"script:links": "bun ./scripts/check-links.ts",
11+
"script:generate-smart-contract-docs": "rm -rf src/pages/tmp && forge doc --build --out src/pages/tmp && bun ./scripts/generate-smart-contract-docs.ts && rm -rf src/pages/tmp",
12+
"prepare": "husky"
1613
},
1714
"dependencies": {
1815
"remark": "15.0.1",
1916
"remark-cli": "12.0.1",
20-
"remark-inline-links": "7.0.0",
21-
"remark-lint-heading-capitalization": "1.3.0",
22-
"remark-lint-heading-case": "1.0.0",
2317
"remark-lint-match-punctuation": "0.2.1",
2418
"remark-lint-no-url-trailing-slash": "3.0.1",
25-
"remark-math": "6.0.0",
26-
"remark-preset-lint-consistent": "6.0.1",
27-
"remark-preset-lint-markdown-style-guide": "6.0.1",
28-
"remark-preset-lint-recommended": "7.0.1",
29-
"remark-remove-url-trailing-slash": "3.0.0",
30-
"remark-sort-definitions": "3.0.0",
31-
"remark-toc": "9.0.0",
32-
"remark-wiki-link": "2.0.1",
3319
"tailwindcss": "4.1.13",
3420
"vite-plugin-sitemap": "0.8.2",
3521
"vocs": "1.0.13"
3622
},
3723
"packageManager": "bun@1.3.0",
38-
"bin": {
39-
"vocs": "./node_modules/.bin/vocs"
40-
},
4124
"devDependencies": {
4225
"@number-flow/react": "0.5.10",
43-
"@tanstack/react-query": "5.90.4"
26+
"@tanstack/react-query": "5.90.4",
27+
"husky": "9.1.7"
4428
},
4529
"patchedDependencies": {
4630
"vocs@1.0.13": "patches/vocs@1.0.13.patch"

package_old.json

Lines changed: 0 additions & 43 deletions
This file was deleted.

scripts/generate-link-previews.ts

Lines changed: 0 additions & 84 deletions
This file was deleted.
File renamed without changes.

src/components/link-preview.tsx

Lines changed: 0 additions & 135 deletions
This file was deleted.

0 commit comments

Comments
 (0)