Skip to content

Commit

Permalink
docs: trans dumi to vitepress for documents
Browse files Browse the repository at this point in the history
  • Loading branch information
vortesnail committed Sep 23, 2024
1 parent f2fae6b commit fc25b68
Show file tree
Hide file tree
Showing 112 changed files with 5,156 additions and 6,480 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
name: Deploy GitHub Pages
name: Deploy QierPlayer Docs to GitHub Pages

on:
push:
branches:
- master
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: macos-latest
# 构建工作
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
persist-credentials: false

fetch-depth: 0 # 如果未启用 lastUpdated,则不需要
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn # 或 pnpm / npm
- name: Build
working-directory: ./website
run: yarn && yarn build

- name: Deploy
uses: JamesIves/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: website/dist
folder: website/docs/.vitepress/dist
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/**/node_modules
/**/build
/**/dist
/**/website
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
"source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": "explicit"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand Down
17 changes: 0 additions & 17 deletions README-zh-Cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ npm install --save qier-player
yarn add qier-player
```

当然你也可以使用 CDN 服务:

```html
<script src="https://unpkg.com/qier-player@latest/dist/umd/index.min.js"></script>
```

### 使用

```js
Expand All @@ -65,14 +59,3 @@ const player = new Player({
});
player.mount('#app');
```

## 生态

| Name | version | gzip size |
| --- | --- | --- |
| [qier-player-for-react]() | [![npm](https://img.shields.io/npm/v/@qier-player/react?logo=npm&style=flat-square)](https://www.npmjs.com/package/@qier-player/react) | [![gzip size](https://img.shields.io/bundlephobia/minzip/@qier-player/react?label=gzip%20size&style=flat-square)](https://unpkg.com/@qier-player/[email protected]/dist/umd/index.min.js) |

## Future features

- `@qier-player/vue` for Vue developer.
- `@qier-player/danmaku` plungin.
17 changes: 0 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ npm install --save qier-player
yarn add qier-player
```

Of course you can also use CDN service:

```html
<script src="https://unpkg.com/qier-player@latest/dist/umd/index.min.js"></script>
```

### Use

```js
Expand All @@ -65,14 +59,3 @@ const player = new Player({
});
player.mount('#app');
```

## Ecosystem

| Name | version | gzip size |
| --- | --- | --- |
| [qier-player-for-react]() | [![npm](https://img.shields.io/npm/v/@qier-player/react?logo=npm&style=flat-square)](https://www.npmjs.com/package/@qier-player/react) | [![gzip size](https://img.shields.io/bundlephobia/minzip/@qier-player/react?label=gzip%20size&style=flat-square)](https://unpkg.com/@qier-player/[email protected]/dist/umd/index.min.js) |

## Future features

- `@qier-player/vue` for Vue developer.
- `@qier-player/danmaku` plungin.
3 changes: 2 additions & 1 deletion fixtures/qier-player-danmaku/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ window.onload = function () {
const genDanmu = (time, danmu) => {
if (!danmu) return;
setTimeout(() => {
danmaku.add(danmu, 'fixed-top');
// danmaku.add(danmu, 'fixed-top');
danmaku.add(danmu, 'rolling');
}, time);
};

Expand Down
2 changes: 1 addition & 1 deletion packages/qier-player-danmaku/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Powerful danmaku, support many features.",
"main": "dist/es/index.js",
"module": "dist/es/index.js",
"types": "dist/es/index.d.ts",
"typings": "dist/es/index.d.ts",
"author": "vortesnail <[email protected]>",
"files": [
"dist"
Expand Down
1 change: 1 addition & 0 deletions packages/qier-player-danmaku/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import './style/index.scss';

export { Danmaku as default } from './main/danmaku';
export * from './main/danmaku';
2 changes: 1 addition & 1 deletion packages/qier-player-danmaku/src/main/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface DanmakuOptions {
duration: number;
zoom: number;

eventProxyElement?: HTMLHtmlElement; // 弹幕交互的事件代理 dom 元素
eventProxyElement?: HTMLElement; // 弹幕交互的事件代理 dom 元素
}

export type DanmakuOptionsInit = Partial<DanmakuOptions>;
Expand Down
2 changes: 1 addition & 1 deletion packages/qier-player/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Easy to use and powerful html5 player.",
"main": "dist/es/index.js",
"module": "dist/es/index.js",
"types": "dist/es/index.d.ts",
"typings": "dist/es/index.d.ts",
"author": "vortesnail <[email protected]>",
"files": [
"dist"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class Settings extends DomNode implements IControllerEle {
this.items = player.settingItems;
this.el.appendChild(Icon.settings());

// 占位填充弹框和 icon 之间的空白,防止光标移开 icon 弹框就消失
this.stuffing = this.el.appendChild(createEle('div.controller_settings_stuffing'));

this.popover = new Popover(this.el, { willChange: 'width, height' });
Expand Down
16 changes: 0 additions & 16 deletions website/.editorconfig

This file was deleted.

14 changes: 3 additions & 11 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/npm-debug.log*
/yarn-error.log
/package-lock.json

# production
/dist

# misc
.DS_Store

# umi
.umi
.umi-production
.env.local

# ide
/.vscode
/.idea
# custom ignore
docs/.vitepress/cache
docs/.vitepress/dist
6 changes: 0 additions & 6 deletions website/.prettierignore

This file was deleted.

11 changes: 0 additions & 11 deletions website/.prettierrc

This file was deleted.

76 changes: 0 additions & 76 deletions website/.umirc.ts

This file was deleted.

21 changes: 0 additions & 21 deletions website/README.md

This file was deleted.

20 changes: 0 additions & 20 deletions website/components/home/Code.tsx

This file was deleted.

22 changes: 0 additions & 22 deletions website/components/home/feature.ts

This file was deleted.

Loading

0 comments on commit fc25b68

Please sign in to comment.