Skip to content

Commit

Permalink
chore: optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 committed Mar 30, 2023
1 parent d3d6c50 commit bed9adb
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
27 changes: 27 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Setup
description: Setup Node.js and install dependencies

runs:
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc

- name: Cache dependencies
id: yarn-cache
uses: actions/cache@v3
with:
path: |
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: |
yarn install --frozen-lockfile
yarn patch-package
shell: bash
7 changes: 2 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
- run: yarn
- name: Setup
uses: ./.github/actions/setup

- name: Setup NPM auth token
run: |
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.18.1
4 changes: 2 additions & 2 deletions ts/Renderer/RendererManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class RendererManager {
*
* @param mode The use mode of the audio frame. See RawAudioFrameOpModeType .
*/
setRenderMode(mode: RENDER_MODE) {
public setRenderMode(mode: RENDER_MODE) {
this.renderMode = mode;
logInfo(
'setRenderMode: new render mode will take effect only if new view bind to render'
Expand Down Expand Up @@ -270,7 +270,7 @@ export class RendererManager {
renderMap.clear();
}

clear(): void {
public clear(): void {
this.stopRender();
this.removeAllRenderer();
}
Expand Down

0 comments on commit bed9adb

Please sign in to comment.