Skip to content

Commit 9d00830

Browse files
authored
[docs] update GitHub and website multilingual documentation links (#25)
1 parent c295656 commit 9d00830

File tree

5 files changed

+144
-14
lines changed

5 files changed

+144
-14
lines changed

ReadMe-zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![WebCell logo](https://web-cell.dev/WebCell-0.f9823b00.png)
44

5-
简体中文 | [English](./ReadMe)
5+
简体中文 | [English](./)
66

77
基于 VDOM、[JSX][2][MobX][3][TypeScript][4][Web 组件][1] 引擎
88

ReadMe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![WebCell logo](https://web-cell.dev/WebCell-0.f9823b00.png)
44

5-
[简体中文](./ReadMe-zh) | English
5+
[简体中文](./ReadMe-zh.md) | English
66

77
[Web Components][1] engine based on VDOM, [JSX][2], [MobX][3] & [TypeScript][4]
88

pack-docs.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# generate multilingual file
2+
for file in ReadMe-*.md; do
3+
typedoc --readme $file
4+
5+
mv docs/index.html ${file%.md}.html
6+
done
7+
8+
# generate docs
9+
typedoc source/
10+
11+
# copy html file to docs folder, replace link
12+
for file in ReadMe-*.html; do
13+
# example: mv ReadMe-zh.html docs/zh.html
14+
mv $file docs/"${file#ReadMe-}"
15+
16+
# example: replace ReadMe-zh.md zh.html
17+
replace "./${file%.html}.md" "./${file#ReadMe-}" docs/*.html
18+
done

package.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "web-cell",
3-
"version": "3.0.0-rc.8",
3+
"version": "3.0.0-rc.9",
44
"description": "Web Components engine based on VDOM, JSX, MobX & TypeScript",
55
"keywords": [
66
"web",
@@ -55,10 +55,12 @@
5555
"jest": "^29.7.0",
5656
"jest-environment-jsdom": "^29.7.0",
5757
"jsdom": "^24.0.0",
58-
"lint-staged": "^15.2.0",
58+
"lint-staged": "^15.2.1",
5959
"open-cli": "^8.0.0",
6060
"parcel": "~2.11.0",
6161
"prettier": "^3.2.4",
62+
"prettier-plugin-sh": "^0.14.0",
63+
"replace": "^1.2.2",
6264
"rimraf": "^5.0.5",
6365
"ts-jest": "^29.1.2",
6466
"ts-node": "^10.9.2",
@@ -73,20 +75,23 @@
7375
"preview": "npm run clean && cd preview/ && parcel --dist-dir=../docs/preview/ --open",
7476
"pack-preview": "rimraf .parcel-cache/ docs/preview/ && cd preview/ && parcel build --public-url=. --dist-dir=../docs/preview/",
7577
"pack-dist": "parcel build source/index.ts",
76-
"pack-docs": "typedoc source/",
78+
"pack-docs": "./pack-docs.sh",
7779
"build": "npm run clean && npm run pack-dist && npm run pack-docs && npm run pack-preview",
7880
"start": "npm run pack-docs && open-cli docs/index.html",
7981
"prepublishOnly": "npm test && npm run build"
8082
},
8183
"lint-staged": {
82-
"*.{md,json,yml,js,ts,tsx}": "prettier --write",
84+
"*.{md,json,yml,js,ts,tsx,sh}": "prettier --write",
8385
"*.{js,ts,tsx}": "eslint --fix"
8486
},
8587
"prettier": {
8688
"singleQuote": true,
8789
"trailingComma": "none",
8890
"arrowParens": "avoid",
89-
"tabWidth": 4
91+
"tabWidth": 4,
92+
"plugins": [
93+
"prettier-plugin-sh"
94+
]
9095
},
9196
"browserslist": "> 0.5%, last 2 versions, not dead, IE 11",
9297
"targets": {

pnpm-lock.yaml

Lines changed: 114 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)