Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] update GitHub and website multilingual documentation links #25

Merged
merged 6 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ReadMe-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

简体中文 | [English](./ReadMe)
简体中文 | [English](./)

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

Expand Down
2 changes: 1 addition & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

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

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

Expand Down
18 changes: 18 additions & 0 deletions pack-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# generate multilingual file
for file in ReadMe-*.md; do
typedoc --readme $file

mv docs/index.html ${file%.md}.html
done

# generate docs
typedoc source/

# copy html file to docs folder, replace link
for file in ReadMe-*.html; do
# example: mv ReadMe-zh.html docs/zh.html
mv $file docs/"${file#ReadMe-}"

# example: replace ReadMe-zh.md zh.html
replace "./${file%.html}.md" "./${file#ReadMe-}" docs/*.html
done
15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web-cell",
"version": "3.0.0-rc.8",
"version": "3.0.0-rc.9",
"description": "Web Components engine based on VDOM, JSX, MobX & TypeScript",
"keywords": [
"web",
Expand Down Expand Up @@ -55,10 +55,12 @@
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jsdom": "^24.0.0",
"lint-staged": "^15.2.0",
"lint-staged": "^15.2.1",
"open-cli": "^8.0.0",
"parcel": "~2.11.0",
"prettier": "^3.2.4",
"prettier-plugin-sh": "^0.14.0",
"replace": "^1.2.2",
"rimraf": "^5.0.5",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
Expand All @@ -73,20 +75,23 @@
"preview": "npm run clean && cd preview/ && parcel --dist-dir=../docs/preview/ --open",
"pack-preview": "rimraf .parcel-cache/ docs/preview/ && cd preview/ && parcel build --public-url=. --dist-dir=../docs/preview/",
"pack-dist": "parcel build source/index.ts",
"pack-docs": "typedoc source/",
"pack-docs": "./pack-docs.sh",
"build": "npm run clean && npm run pack-dist && npm run pack-docs && npm run pack-preview",
"start": "npm run pack-docs && open-cli docs/index.html",
"prepublishOnly": "npm test && npm run build"
},
"lint-staged": {
"*.{md,json,yml,js,ts,tsx}": "prettier --write",
"*.{md,json,yml,js,ts,tsx,sh}": "prettier --write",
"*.{js,ts,tsx}": "eslint --fix"
},
"prettier": {
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid",
"tabWidth": 4
"tabWidth": 4,
"plugins": [
"prettier-plugin-sh"
]
},
"browserslist": "> 0.5%, last 2 versions, not dead, IE 11",
"targets": {
Expand Down
121 changes: 114 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading