Skip to content

Commit

Permalink
Merge branch 'preview-fixes' into master-cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
the1812 committed Feb 11, 2025
2 parents 17df14f + 65143cb commit 8e22e65
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
30 changes: 25 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,28 @@ pnpm install
配置本地调试环境:

**启动开发服务 dev-server**

> 无论选择哪种方式, 下文均以 "运行 `启动开发服务 dev-server`" 指代这个步骤.
方式 1 (推荐): 直接使用 [VS Code Tasks](https://code.visualstudio.com/docs/editor/tasks) 运行 `启动开发服务 dev-server`

方式 2:
1. 新建一个终端, 进入项目根目录
2. 运行 `pnpm ts-node dev-tools/dev-server/index.ts` 启动开发服务

两种方式都会看到类似下面的输出:
```bash
DevServer 已启动, 端口: 23333
本体编译中...
(...可能有一长串输出)

本体已编译: (一段 hash)
```


**如果使用的是基于 Chromium 的浏览器**
1. VS Code 中运行 `启动开发服务 dev-server` 任务, 会在项目的 `dist/` 文件夹下生成一个开发用的脚本 `dist/bilibili-evolved.dev.user.js`.
1. 启动开发服务后, 会在项目的 `dist/` 文件夹下生成一个开发用的脚本 `dist/bilibili-evolved.dev.user.js`.
2. Chrome 插件管理 `chrome://extensions/` > Tampermonkey > 详细信息
3. 打开 `允许访问文件网址`
4. 新建脚本
Expand Down Expand Up @@ -81,7 +101,7 @@ pnpm install
// ==/UserScript==
```

6. 将里面的 `{{ bilibili-evolved.dev.user.js的绝对路径 }}` 替换为第一步生成的文件的真实路径.
1. 将里面的 `{{ bilibili-evolved.dev.user.js 的绝对路径 }}` 替换为第一步生成的文件的真实路径.
> Windows 例子: `@require file://C:/xxx/Bilibili-Evolved/dist/bilibili-evolved.dev.user.js`
> macOS 例子: `@require file:///Users/xxx/Documents/Bilibili-Evolved/dist/bilibili-evolved.dev.user.js`
Expand All @@ -91,9 +111,9 @@ pnpm install
7. 进入 b 站, 安装 `DevClient` 组件, 功能中显示已连接时就是成功了

**如果使用 Firefox 或 Safari**
1. 运行 `启动开发服务 dev-server` 任务时, 假设得到的本体链接为 `http://localhost:23333/dist/bilibili-evolved.dev.user.js`
2. 继续 Chromium 指南中的第 3 ~ 6 步, 但在第 6 步时 `@require` 的链接使用 `http://localhost:23333/dist/bilibili-evolved.dev.user.js`.
3. 保存脚本, 运行 `启动开发服务 dev-server` 任务
1. 启动开发服务后, 会在项目的 `dist/` 文件夹下生成一个开发用的脚本 `dist/bilibili-evolved.dev.user.js`.
2. 开发服务会在默认的 `23333` 端口服务 `dist/` 文件夹下的内容, 因此上一步的文件链接就为 `http://localhost:23333/dist/bilibili-evolved.dev.user.js`.
3. 继续 Chromium 指南中的第 3 ~ 6 步, 但在第 6 步时 `@require` 的链接使用 `http://localhost:23333/dist/bilibili-evolved.dev.user.js`.
4. 进入 b 站, 安装 `DevClient` 组件, 将 `本体刷新策略` 设置为 `不刷新`, 功能中显示已连接时就是成功了
5. 每次本体代码变动后, 需要在 Tampermonkey 中编辑脚本 - 外部, 删除 `localhost` 的缓存文件后刷新生效.

Expand Down
2 changes: 1 addition & 1 deletion dev-tools/dev-server/watcher-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const defaultWatcherHandler = (
assets: false,
modules: false,
chunks: false,
color: true,
colors: true,
}),
)
}
Expand Down
4 changes: 4 additions & 0 deletions registry/lib/components/style/dark-mode/dark-slice-18.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1025,3 +1025,7 @@
z-index: 1 !important;
}
}

.video-argue-inner{
@include background-color('3');
}

0 comments on commit 8e22e65

Please sign in to comment.