-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: lainio24 <[email protected]>
- Loading branch information
1 parent
b2899df
commit bde81e4
Showing
27 changed files
with
2,490 additions
and
644 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.yml] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,8 @@ temp | |
|
||
node_modules | ||
|
||
public/lib | ||
src/lib | ||
src/lib/* | ||
!src/lib/*.d.ts | ||
|
||
public/*.js | ||
public/*.js.map | ||
public | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
src/lib/* | ||
assets/lib/* | ||
assets/dist/* | ||
src/lib/*.js | ||
src/lib/*.css | ||
public/* | ||
build/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,28 +11,32 @@ | |
## 关于 | ||
|
||
使用 TypeScript 重构并开源了很早之前 PCC-Studio 编写与内部使用的项目。 | ||
> ~~LainIO24:早期的雪山代码并没有得到重构,反而堆得更高力(悲~~ | ||
|
||
自提交 `9eddaae4` 起加入了更多的新功能。 | ||
<details> | ||
|
||
## 使用 | ||
<summary>🏔</summary> | ||
|
||
早期的雪山代码并没有得到重构,反而堆得更高力(悲 | ||
|
||
- [网站版](https://hi.auioc.org/BilibiliLocalPlayerH5) | ||
- [单文件版](https://hi.auioc.org/BilibiliLocalPlayerH5/aio.html):使用“另存为……”可保存为单个 HTML 文件到本地离线使用。 | ||
</details> | ||
|
||
两版本功能完全相同。 | ||
## 使用 | ||
|
||
- <https://hi.auioc.org/BilibiliLocalPlayerH5> | ||
|
||
## 开发 | ||
|
||
1. 克隆项目到本地 | ||
2. 下载 [`CommentCoreLibrary.js`](https://github.com/jabbany/CommentCoreLibrary/raw/19db2962ed0ce637a2b99facdf8634d51bb1b503/dist/CommentCoreLibrary.js) 和 [`ass.js`](https://github.com/weizhenye/ASS/raw/e6a3605a2343655d9ef80bdd7e9fe92f92edca22/dist/ass.js) 到 `src/lib` | ||
3. 运行 `tsc` 指令构建 `public/player.js` | ||
4. 浏览器打开 `public/index.html` 即可使用或调试 | ||
2. `pnpm install` | ||
3. 下载 `CommentCoreLibrary` 到 `src/lib`[^1]: | ||
|
||
- [`CommentCoreLibrary.js`](https://unpkg.com/[email protected]/dist/CommentCoreLibrary.js) | ||
- [`CommentCoreLibrary.css`](https://unpkg.com/[email protected]/dist/css/style.css) | ||
|
||
注意事项: | ||
4. 运行 `pnpm run build:dev` | ||
5. 浏览器打开 `public/index.html` | ||
|
||
- 本项目构建不需要项目级别的 NPM 包,需要的只有用于编译 TypeScript 的全局包 `typescript`。 | ||
- `build.sh` 脚本用于持续集成自动构建,开发时一般不需要使用,在本地使用可能会破坏项目结构! | ||
[^1]: <https://github.com/jabbany/CommentCoreLibrary/issues/94> | ||
|
||
## 致谢 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
#!/bin/sh | ||
|
||
mkdir temp | ||
mkdir public | ||
mkdir build | ||
|
||
# NPM | ||
npm install -g typescript | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"name": "bilibili-local-player-h5", | ||
"version": "2.0.0", | ||
"description": "bilibili-local-player-h5", | ||
"main": "index.js", | ||
"type": "module", | ||
"scripts": { | ||
"dev:html": "cross-env NODE_ENV=development node scripts/build-html.cjs", | ||
"dev:script": "cross-env NODE_ENV=development rollup -c --bundleConfigAsCjs", | ||
"dev:style": "cross-env NODE_ENV=development node scripts/build-style.cjs", | ||
"prod:html": "cross-env NODE_ENV=production node scripts/build-html.cjs", | ||
"prod:script": "cross-env NODE_ENV=production rollup -c --bundleConfigAsCjs", | ||
"prod:style": "cross-env NODE_ENV=production node scripts/build-style.cjs", | ||
"watch:html": "onchange -i \"src/html/*\" -- pnpm run dev:html", | ||
"watch:script": "rollup -c rollup.config.js --bundleConfigAsCjs --watch", | ||
"watch:style": "onchange -i \"src/style/*\" -- pnpm run dev:style", | ||
"build:dev": "pnpm run dev:html && pnpm run dev:style && pnpm run dev:script", | ||
"build": "pnpm run prod:html && pnpm run prod:style && pnpm run prod:script" | ||
}, | ||
"keywords": [], | ||
"homepage": "https://hi.auioc.org/BilibiliLocalPlayerH5/", | ||
"author": { | ||
"name": "PCC-Studio", | ||
"url": "https://www.pccstudio.com" | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "LainIO24", | ||
"email": "[email protected]", | ||
"url": "https://github.com/lainio24" | ||
}, | ||
{ | ||
"name": "WakelessSloth56", | ||
"url": "https://github.com/WakelessSloth56" | ||
}, | ||
{ | ||
"name": "AUIOC", | ||
"url": "https://www.auioc.org" | ||
} | ||
], | ||
"license": "AGPL-3.0-or-later", | ||
"dependencies": { | ||
"assjs": "^0.0.11" | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^26.0.1", | ||
"@rollup/plugin-legacy": "^3.0.2", | ||
"@rollup/plugin-replace": "^5.0.7", | ||
"@rollup/plugin-terser": "^0.4.4", | ||
"@rollup/plugin-typescript": "^11.1.6", | ||
"@types/node": "^20.14.10", | ||
"cross-env": "^7.0.3", | ||
"html-minifier-terser": "^7.2.0", | ||
"node-html-parser": "^6.1.13", | ||
"onchange": "^7.1.0", | ||
"rollup": "^4.18.1", | ||
"terser": "^5.31.2", | ||
"tslib": "^2.6.3", | ||
"typescript": "^5.5.3" | ||
} | ||
} |
Oops, something went wrong.