Skip to content

Commit

Permalink
feat: improve development experience
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-jerry-ye committed Jan 6, 2025
1 parent f6f1fd0 commit d5c9d2c
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

This repository hosts the documentation website for MoonBit [docs.moonbitlang.com](https://docs.moonbitlang.com).

Open `document.code-workspace` for better development experience.

## Layout

- `legacy/examples` : some small examples for MoonBit.
- `next` : current documentation hosted on readthedocs based on Sphinx. Check [README](./next/README).
- `moonbit-tour` : an interactive tour. Check [README](./moonbit-tour/README.md)
137 changes: 137 additions & 0 deletions document.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
{
"folders": [
{
"path": "legacy/examples",
"name": "examples"
},
{
"path": "next",
"name": "document"
},
{
"path": "moonbit-tour",
"name": "tour",
}
],
"tasks": {
"version": "2.0.0",
"tasks": [
{
"label": "Watch Document 监视文档",
"command": "make",
"type": "shell",
"args": [
"html"
],
"options": {
"env": {
"SPHINXBUILD": "sphinx-autobuild",
"SPHINXOPTS": "-D language='${input:language}'"
},
"cwd": "${workspaceFolder:document}"
},
"group": "build"
},
{
"label": "Build Document 构建文档",
"command": "make",
"type": "shell",
"args": [
"${input:target}"
],
"options": {
"env": {
"SPHINXOPTS": "-D language='${input:language}'"
},
"cwd": "${workspaceFolder:document}"
},
"group": "build"
},
{
"label": "Translate Document 翻译文档",
"command": "make gettext && sphinx-intl update -p _build/gettext -l zh_CN",
"type": "shell",
"options": {
"cwd": "${workspaceFolder:document}"
},
"group": "build"
},
{
"label": "Install Dependencies 安装依赖",
"command": "pnpm",
"type": "shell",
"args": [
"install"
],
"options": {
"cwd": "${workspaceFolder:document}"
},
"group": "build"
},
{
"label": "Develop Tour 开发导览",
"command": "pnpm",
"type": "shell",
"args": [
"dev"
],
"options": {
"cwd": "${workspaceFolder:tour}"
},
"group": "build",
"dependsOn": [
"Install Dependencies 安装依赖"
]
}
],
"inputs": [
{
"id": "language",
"type": "pickString",
"description": "Language 语言",
"default": "en",
"options": [
{
"value": "en",
"label": "English 英语",
},
{
"value": "zh_CN",
"label": "Chinese 中文"
}
],
},
{
"id": "target",
"type": "pickString",
"default": "html",
"description": "Target 目标",
"options": [
{
"value": "html",
"label": "HTML"
},
{
"value": "latexpdf",
"label": "PDF"
},
{
"value": "markdown",
"label": "Markdown"
}
]
}
]
},
"settings": {
"task.autoDetect": "off",
"editor.rulers": [ 80 ],
},
"extensions": {
"recommendations": [
"ms-python.python",
"executablebookproject.myst-highlight",
"moonbit.moonbit-lang"
]
}
}
2 changes: 1 addition & 1 deletion next/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ python3 -m http.server -d _build/html
For PDF:

```bash
PATH=$PATH:/usr/local/texlive/2024/bin/universal-darwin/ make latexpdf
make latexpdf
open ./_build/latex/moonbitdocument.pdf
```

Expand Down

0 comments on commit d5c9d2c

Please sign in to comment.