Skip to content

Commit 9162a67

Browse files
authored
Merge pull request #58 from jingjingxyk/feature-build-doc
增加生成 文档 命令
2 parents bada2a4 + 5678164 commit 9162a67

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
# https://github.com/editorconfig/editorconfig/wiki/Projects-Using-EditorConfig
3+
4+
root = true
5+
6+
[*]
7+
insert_final_newline = true
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
end_of_line = lf
11+
12+
[*.{md,markdown}]
13+
trim_trailing_whitespace = false
14+
indent_size = 2
15+
indent_style = space

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
11
# swoole docs
22

3-
## development
3+
## development live preview doc
44

55
```shell
66

7-
npm install
7+
# npm install -g pnpm
8+
9+
pnpm install
810
# with npm china mirror registry
9-
# npm install --registry=https://registry.npmmirror.com
11+
# pnpm install --registry=https://registry.npmmirror.com
1012

1113
npm run dev
1214

1315
```
16+
17+
## generate doc
18+
19+
默认 web 工作目录位于 public
20+
The default public web directory is public
21+
22+
```shell
23+
24+
npm run build
25+
26+
```

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
},
1515
"scripts": {
1616
"dev": "cd public && npx docsify start .",
17+
"build": "cd public && { echo 'web working directory: '$(pwd) ; } && { test -f _sidebar.md && rm -f _sidebar.md ; } && npx docsify generate . ",
1718
"authors": "git log --format=\"%aN <%aE>\" | sort -u"
1819
}
1920
}

0 commit comments

Comments
 (0)