Skip to content

Commit 03f902c

Browse files
committed
docs: update readme
1 parent 991dc40 commit 03f902c

File tree

2 files changed

+26
-30
lines changed

2 files changed

+26
-30
lines changed

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,21 +93,17 @@ stage: dev # (可选) 用于区分环境信息,默认值是 dev
9393

9494
inputs:
9595
src:
96-
root: ./
9796
src: ./src
98-
hook: npm run build
9997
index: index.html
100-
websitePath: ./
98+
# dist: ./dist
99+
# hook: npm run build
100+
# websitePath: ./
101101
region: ap-guangzhou
102102
bucketName: my-bucket
103-
protocol: http
104-
hosts:
105-
- host: anycoder.cn
106-
https:
107-
certId: 123
103+
protocol: https
108104
```
109105
110-
点此查看[全量配置及配置说明](https://github.com/serverless-components/tencent-website/blob/v2/doc/serverless.yaml)
106+
点此查看[全量配置及配置说明](https://github.com/serverless-components/tencent-website/blob/v2/docs/configure.md)
111107
112108
当你根据该配置文件更新配置字段后,再次运行 `serverless deploy` 或者 `serverless` 就可以更新配置到云端。
113109

doc/configure.md renamed to docs/configure.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ stage: dev
1313

1414
inputs:
1515
src:
16-
root: ./
1716
src: ./src
18-
hook: npm run build
17+
# dist: ./dist
18+
# hook: npm run build
1919
index: index.html
2020
error: index.html
21-
websitePath: ./
21+
# websitePath: ./
2222
region: ap-guangzhou
2323
bucketName: my-bucket
2424
protocol: http
@@ -90,27 +90,27 @@ inputs:
9090
9191
主要参数描述
9292
93-
| 参数名称 | 是否必选 | 默认值 | 描述 |
94-
| ------------------------------- | :------: | :----------: | :---------------------------------------------------------------------------------------- |
95-
| [src](#code-param-description) | 是 | | 该项目的代码信息,参数参考执行目录 |
96-
| region | 否 | ap-guangzhou | 代码上传所在的 cos 区域。默认为广州区。 |
97-
| bucketName | 是 | | Bucket 名称。 不允许大写字母。如果你不加 AppId 后缀,则默认自动会为你加上。 |
98-
| protocol | 否 | https | 请求协议。Https 或 http |
99-
| env | 否 | | 环境变量参数文件。会将 env 下配置的参数写入 env.js 文件中,将该文件打包上传到你的代码里。 |
100-
| envPath | 否 | | 生成的 env.js 存放在你项目中的路径。默认是当前工作路径。 |
101-
| [cors](#cors-param-description) | 否 | | 跨域访问配置 |
102-
| [hosts](#CDN-配置) | 否 | | CND 加速域名配置 |
93+
| 参数名称 | 是否必选 | 默认值 | 描述 |
94+
| ------------------ | :------: | :----------: | :---------------------------------------------------------------------------------------- |
95+
| [src](#执行目录) | 是 | | 该项目的代码信息,参数参考执行目录 |
96+
| region | 否 | ap-guangzhou | 代码上传所在的 cos 区域。默认为广州区。 |
97+
| bucketName | 是 | | Bucket 名称。 不允许大写字母。如果你不加 AppId 后缀,则默认自动会为你加上。 |
98+
| protocol | 否 | https | 请求协议。Https 或 http |
99+
| env | 否 | | 环境变量参数文件。会将 env 下配置的参数写入 env.js 文件中,将该文件打包上传到你的代码里。 |
100+
| envPath | 否 | | 生成的 env.js 存放在你项目中的路径。默认是当前工作路径。 |
101+
| [cors](#跨域配置) | 否 | | 跨域访问配置 |
102+
| [hosts](#CDN-配置) | 否 | | CND 加速域名配置 |
103103
104104
### 执行目录
105105
106-
| 参数名称 | 是否必选 | 默认值 | 描述 |
107-
| ----------- | :------: | :--------: | :-------------------------------------------------------- |
108-
| root | | | 钩子脚本执行构建后,输出的目录。默认为 src 所指定的目录。 |
109-
| src | | | 你构建的项目代码目录。 |
110-
| websitePath | | | 网站根目录。 |
111-
| hook | 否 | | 钩子脚本。在你项目代码上传之前执行。 |
112-
| index | 否 | index.html | 网站 index 页面 |
113-
| error | 否 | error.html | 网站 error 页面 |
106+
| 参数名称 | 是否必选 | 默认值 | 描述 |
107+
| ----------- | :------: | :--------: | :----------------------------------------------------------- |
108+
| src | | | 你构建的项目代码目录。 |
109+
| websitePath | | | 网站根目录。 |
110+
| dist | | | 钩子脚本执行构建后,输出的目录。如果配置 `hook`, 此参数必填 |
111+
| hook | 否 | | 钩子脚本。在你项目代码上传之前执行。 |
112+
| index | 否 | index.html | 网站 index 页面 |
113+
| error | 否 | error.html | 网站 error 页面 |
114114

115115
### 跨域配置
116116

0 commit comments

Comments
 (0)