Skip to content

Commit 0f65480

Browse files
committed
docs(readme.md): 更新文档内容 加入直接引入JS的文档
1 parent fb0d061 commit 0f65480

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,24 @@
1818
```shell
1919
yarn add @ohbug/miniapp
2020
```
21+
或直接下载 [releases](https://github.com/ohbug-org/ohbug-miniapp/releases)
2122

2223
2. 「微信开发者工具 - 工具 - 构建 npm」,更多内容可查询[文档](https://developers.weixin.qq.com/miniprogram/dev/devtools/npm.html)
2324

2425
3. 初始化
2526
```javascript
2627
// 新建文件 ohbug.js
28+
// 引入 SDK
2729
import Ohbug from "@ohbug/miniapp";
30+
// 或者直接引入js
31+
import Ohbug from "./ohbug-miniapp.esm.prod.js"
32+
// or
33+
const Ohbug = require("./ohbug-miniapp.cjs.prod.js")
2834

2935
const client = Ohbug.init({ apiKey: "YOUR_API_KEY" });
30-
3136
export default client;
3237
```
38+
3339
```javascript
3440
// app.js
3541
import './ohbug';

0 commit comments

Comments
 (0)