Skip to content

Commit a8ce503

Browse files
Release 1.0.0-rc.1
1 parent 49b11c0 commit a8ce503

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

README.en.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ You can also check out example web pages:
2828
If you are a beginner or only need the basic functionality, you can simply add the following line of code to the `head` or `body` of your HTML page to load the widget:
2929

3030
```html
31-
<script src="https://fastly.jsdelivr.net/npm/live2d-widgets@0/autoload.js"></script>
31+
<script src="https://fastly.jsdelivr.net/npm/live2d-widgets@1/autoload.js"></script>
3232
```
3333

3434
The placement of the code depends on how your website is built. For example, if you are using [Hexo](https://hexo.io), you need to add the above code to the template file of your theme. The modification process is similar for pages generated using various template engines.
@@ -49,7 +49,7 @@ You can refer to the source code of `dist/autoload.js` to see the available conf
4949
| `modelId` | `number` | `0` | Default model id |
5050
| `tools` | `string[]` | see `autoload.js` | Buttons of the loaded tools |
5151
| `drag` | `boolean` | `false` | Make the widget draggable |
52-
| `logLevel` | `string` | `error` | Log level: `error``info``trace` |
52+
| `logLevel` | `string` | `error` | Log level: `error`, `warn`, `info`, `trace` |
5353

5454
Among them, the parameters `apiPath` and `cdnPath` only need to set one of them. `apiPath` is the URL of the backend API, which can be set up and modified by yourself (there are many things to modify, not discussed here). You can refer to [live2d_api](https://github.com/fghrsh/live2d_api) for more information. On the other hand, `cdnPath` is used to load resources through CDN services like jsDelivr, which provides better stability.
5555

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
如果你是小白,或者只需要最基础的功能,那么只用将这一行代码加入 html 页面的 `head``body` 中,即可加载看板娘:
2929

3030
```html
31-
<script src="https://fastly.jsdelivr.net/npm/live2d-widgets@0/autoload.js"></script>
31+
<script src="https://fastly.jsdelivr.net/npm/live2d-widgets@1/autoload.js"></script>
3232
```
3333

3434
添加代码的位置取决于你的网站的构建方式。例如,如果你使用的是 [Hexo](https://hexo.io),那么需要在主题的模版文件中添加以上代码。对于用各种模版引擎生成的页面,修改方法类似。
@@ -49,7 +49,7 @@
4949
| `modelId` | `number` | `0` | 默认模型 id |
5050
| `tools` | `string[]` |`autoload.js` | 加载的小工具按钮 |
5151
| `drag` | `boolean` | `false` | 支持拖动看板娘 |
52-
| `logLevel` | `string` | `error` | 日志等级,支持 `error``info``trace` |
52+
| `logLevel` | `string` | `error` | 日志等级,支持 `error``warn``info``trace` |
5353

5454
其中,`apiPath``cdnPath` 两个参数设置其中一项即可。`apiPath` 是后端 API 的 URL,可以自行搭建,并增加模型(需要修改的内容比较多,此处不再赘述),可以参考 [live2d_api](https://github.com/fghrsh/live2d_api)。而 `cdnPath` 则是通过 jsDelivr 这样的 CDN 服务加载资源,更加稳定。
5555

package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
{
22
"name": "live2d-widgets",
3-
"version": "0.9.0",
3+
"version": "1.0.0-rc.1",
44
"description": "Live2D widget for web pages",
5-
"main": "dist/waifu-tips.js",
6-
"types": "src/types/index.d.ts",
5+
"main": "build/index.js",
6+
"files": [
7+
"build",
8+
"dist",
9+
"src",
10+
"LICENSE",
11+
"README.en.md"
12+
],
13+
"types": "build/index.d.ts",
714
"type": "module",
815
"scripts": {
916
"build": "tsc && rollup -c rollup.config.js",

rollup.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ function string(opts = {}) {
3434
}
3535

3636
export default {
37-
input: 'build/index.js',
37+
input: 'build/waifu-tips.js',
3838
output: {
3939
name: 'live2d_widget',
40-
file: 'dist/index.js',
40+
file: 'dist/waifu-tips.js',
4141
format: 'iife',
4242
},
4343
plugins: [

0 commit comments

Comments
 (0)