diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 3a332841..0365655e 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -28,7 +28,7 @@ jobs: with: fetch-depth: 0 - uses: pnpm/action-setup@v3 - - name: Setup Node + - name: Setup node uses: actions/setup-node@v4 with: node-version: 20 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3a5229be..d64c46b4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,21 +5,22 @@ on: pull_request: jobs: - all: + lint: runs-on: ubuntu-latest - name: All steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - uses: pnpm/action-setup@v3 - - name: Setup Node + - name: Setup node uses: actions/setup-node@v4 with: node-version: 20 cache: pnpm - name: Install dependencies run: pnpm install - - name: Run unit tests - run: pnpm lint + - name: Run api + run: pnpm lint api + - name: Run artisan + run: pnpm lint artisan diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9eecc2b4..5a8697b9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: with: fetch-depth: 0 - uses: pnpm/action-setup@v3 - - name: Setup Node + - name: Setup node uses: actions/setup-node@v4 with: node-version: 20 diff --git a/packages/player/lib/assert.ts b/packages/player/src/assert.ts similarity index 100% rename from packages/player/lib/assert.ts rename to packages/player/src/assert.ts diff --git a/packages/player/lib/event-manager.ts b/packages/player/src/event-manager.ts similarity index 100% rename from packages/player/lib/event-manager.ts rename to packages/player/src/event-manager.ts diff --git a/packages/player/lib/facade.ts b/packages/player/src/facade.ts similarity index 100% rename from packages/player/lib/facade.ts rename to packages/player/src/facade.ts diff --git a/packages/player/lib/index.ts b/packages/player/src/index.ts similarity index 100% rename from packages/player/lib/index.ts rename to packages/player/src/index.ts diff --git a/packages/player/lib/types.ts b/packages/player/src/types.ts similarity index 100% rename from packages/player/lib/types.ts rename to packages/player/src/types.ts diff --git a/packages/player/lib/ui/components/Center.tsx b/packages/player/src/ui/components/Center.tsx similarity index 100% rename from packages/player/lib/ui/components/Center.tsx rename to packages/player/src/ui/components/Center.tsx diff --git a/packages/player/lib/ui/components/CheckList.tsx b/packages/player/src/ui/components/CheckList.tsx similarity index 100% rename from packages/player/lib/ui/components/CheckList.tsx rename to packages/player/src/ui/components/CheckList.tsx diff --git a/packages/player/lib/ui/components/Controls.tsx b/packages/player/src/ui/components/Controls.tsx similarity index 100% rename from packages/player/lib/ui/components/Controls.tsx rename to packages/player/src/ui/components/Controls.tsx diff --git a/packages/player/lib/ui/components/HlsUi.tsx b/packages/player/src/ui/components/HlsUi.tsx similarity index 100% rename from packages/player/lib/ui/components/HlsUi.tsx rename to packages/player/src/ui/components/HlsUi.tsx diff --git a/packages/player/lib/ui/components/Label.tsx b/packages/player/src/ui/components/Label.tsx similarity index 100% rename from packages/player/lib/ui/components/Label.tsx rename to packages/player/src/ui/components/Label.tsx diff --git a/packages/player/lib/ui/components/Pane.tsx b/packages/player/src/ui/components/Pane.tsx similarity index 100% rename from packages/player/lib/ui/components/Pane.tsx rename to packages/player/src/ui/components/Pane.tsx diff --git a/packages/player/lib/ui/components/Progress.tsx b/packages/player/src/ui/components/Progress.tsx similarity index 100% rename from packages/player/lib/ui/components/Progress.tsx rename to packages/player/src/ui/components/Progress.tsx diff --git a/packages/player/lib/ui/components/QualitiesPane.tsx b/packages/player/src/ui/components/QualitiesPane.tsx similarity index 100% rename from packages/player/lib/ui/components/QualitiesPane.tsx rename to packages/player/src/ui/components/QualitiesPane.tsx diff --git a/packages/player/lib/ui/components/Settings.tsx b/packages/player/src/ui/components/Settings.tsx similarity index 100% rename from packages/player/lib/ui/components/Settings.tsx rename to packages/player/src/ui/components/Settings.tsx diff --git a/packages/player/lib/ui/components/SettingsPane.tsx b/packages/player/src/ui/components/SettingsPane.tsx similarity index 100% rename from packages/player/lib/ui/components/SettingsPane.tsx rename to packages/player/src/ui/components/SettingsPane.tsx diff --git a/packages/player/lib/ui/components/SlotProgress.tsx b/packages/player/src/ui/components/SlotProgress.tsx similarity index 100% rename from packages/player/lib/ui/components/SlotProgress.tsx rename to packages/player/src/ui/components/SlotProgress.tsx diff --git a/packages/player/lib/ui/components/SqButton.tsx b/packages/player/src/ui/components/SqButton.tsx similarity index 100% rename from packages/player/lib/ui/components/SqButton.tsx rename to packages/player/src/ui/components/SqButton.tsx diff --git a/packages/player/lib/ui/components/Start.tsx b/packages/player/src/ui/components/Start.tsx similarity index 100% rename from packages/player/lib/ui/components/Start.tsx rename to packages/player/src/ui/components/Start.tsx diff --git a/packages/player/lib/ui/components/TextAudioPane.tsx b/packages/player/src/ui/components/TextAudioPane.tsx similarity index 100% rename from packages/player/lib/ui/components/TextAudioPane.tsx rename to packages/player/src/ui/components/TextAudioPane.tsx diff --git a/packages/player/lib/ui/components/TimeStat.tsx b/packages/player/src/ui/components/TimeStat.tsx similarity index 100% rename from packages/player/lib/ui/components/TimeStat.tsx rename to packages/player/src/ui/components/TimeStat.tsx diff --git a/packages/player/lib/ui/components/VolumeButton.tsx b/packages/player/src/ui/components/VolumeButton.tsx similarity index 100% rename from packages/player/lib/ui/components/VolumeButton.tsx rename to packages/player/src/ui/components/VolumeButton.tsx diff --git a/packages/player/lib/ui/hooks/useDelta.ts b/packages/player/src/ui/hooks/useDelta.ts similarity index 100% rename from packages/player/lib/ui/hooks/useDelta.ts rename to packages/player/src/ui/hooks/useDelta.ts diff --git a/packages/player/lib/ui/hooks/useFullscreen.ts b/packages/player/src/ui/hooks/useFullscreen.ts similarity index 100% rename from packages/player/lib/ui/hooks/useFullscreen.ts rename to packages/player/src/ui/hooks/useFullscreen.ts diff --git a/packages/player/lib/ui/hooks/useHlsState.ts b/packages/player/src/ui/hooks/useHlsState.ts similarity index 100% rename from packages/player/lib/ui/hooks/useHlsState.ts rename to packages/player/src/ui/hooks/useHlsState.ts diff --git a/packages/player/lib/ui/hooks/usePrevious.ts b/packages/player/src/ui/hooks/usePrevious.ts similarity index 100% rename from packages/player/lib/ui/hooks/usePrevious.ts rename to packages/player/src/ui/hooks/usePrevious.ts diff --git a/packages/player/lib/ui/hooks/useSettings.ts b/packages/player/src/ui/hooks/useSettings.ts similarity index 100% rename from packages/player/lib/ui/hooks/useSettings.ts rename to packages/player/src/ui/hooks/useSettings.ts diff --git a/packages/player/lib/ui/hooks/useTime.ts b/packages/player/src/ui/hooks/useTime.ts similarity index 100% rename from packages/player/lib/ui/hooks/useTime.ts rename to packages/player/src/ui/hooks/useTime.ts diff --git a/packages/player/lib/ui/hooks/useVisible.ts b/packages/player/src/ui/hooks/useVisible.ts similarity index 100% rename from packages/player/lib/ui/hooks/useVisible.ts rename to packages/player/src/ui/hooks/useVisible.ts diff --git a/packages/player/lib/ui/icons/forward.svg b/packages/player/src/ui/icons/forward.svg similarity index 100% rename from packages/player/lib/ui/icons/forward.svg rename to packages/player/src/ui/icons/forward.svg diff --git a/packages/player/lib/ui/icons/fullscreen-exit.svg b/packages/player/src/ui/icons/fullscreen-exit.svg similarity index 100% rename from packages/player/lib/ui/icons/fullscreen-exit.svg rename to packages/player/src/ui/icons/fullscreen-exit.svg diff --git a/packages/player/lib/ui/icons/fullscreen.svg b/packages/player/src/ui/icons/fullscreen.svg similarity index 100% rename from packages/player/lib/ui/icons/fullscreen.svg rename to packages/player/src/ui/icons/fullscreen.svg diff --git a/packages/player/lib/ui/icons/pause.svg b/packages/player/src/ui/icons/pause.svg similarity index 100% rename from packages/player/lib/ui/icons/pause.svg rename to packages/player/src/ui/icons/pause.svg diff --git a/packages/player/lib/ui/icons/play.svg b/packages/player/src/ui/icons/play.svg similarity index 100% rename from packages/player/lib/ui/icons/play.svg rename to packages/player/src/ui/icons/play.svg diff --git a/packages/player/lib/ui/icons/settings.svg b/packages/player/src/ui/icons/settings.svg similarity index 100% rename from packages/player/lib/ui/icons/settings.svg rename to packages/player/src/ui/icons/settings.svg diff --git a/packages/player/lib/ui/icons/subtitles.svg b/packages/player/src/ui/icons/subtitles.svg similarity index 100% rename from packages/player/lib/ui/icons/subtitles.svg rename to packages/player/src/ui/icons/subtitles.svg diff --git a/packages/player/lib/ui/icons/volume-0.svg b/packages/player/src/ui/icons/volume-0.svg similarity index 100% rename from packages/player/lib/ui/icons/volume-0.svg rename to packages/player/src/ui/icons/volume-0.svg diff --git a/packages/player/lib/ui/icons/volume-1.svg b/packages/player/src/ui/icons/volume-1.svg similarity index 100% rename from packages/player/lib/ui/icons/volume-1.svg rename to packages/player/src/ui/icons/volume-1.svg diff --git a/packages/player/lib/ui/icons/volume-2.svg b/packages/player/src/ui/icons/volume-2.svg similarity index 100% rename from packages/player/lib/ui/icons/volume-2.svg rename to packages/player/src/ui/icons/volume-2.svg diff --git a/packages/player/lib/ui/icons/volume-muted.svg b/packages/player/src/ui/icons/volume-muted.svg similarity index 100% rename from packages/player/lib/ui/icons/volume-muted.svg rename to packages/player/src/ui/icons/volume-muted.svg diff --git a/packages/player/lib/ui/index.tsx b/packages/player/src/ui/index.tsx similarity index 100% rename from packages/player/lib/ui/index.tsx rename to packages/player/src/ui/index.tsx diff --git a/packages/player/lib/ui/types.ts b/packages/player/src/ui/types.ts similarity index 100% rename from packages/player/lib/ui/types.ts rename to packages/player/src/ui/types.ts diff --git a/packages/player/lib/ui/utils.ts b/packages/player/src/ui/utils.ts similarity index 100% rename from packages/player/lib/ui/utils.ts rename to packages/player/src/ui/utils.ts diff --git a/packages/player/lib/vite-env.d.ts b/packages/player/src/vite-env.d.ts similarity index 100% rename from packages/player/lib/vite-env.d.ts rename to packages/player/src/vite-env.d.ts diff --git a/packages/player/tsconfig.app.json b/packages/player/tsconfig.app.json index 6956b963..3b90d0f8 100644 --- a/packages/player/tsconfig.app.json +++ b/packages/player/tsconfig.app.json @@ -17,5 +17,5 @@ "noFallthroughCasesInSwitch": true, "baseUrl": "." }, - "include": ["example", "lib"] + "include": ["src"] } diff --git a/packages/player/vite.config.ts b/packages/player/vite.config.ts index 1c78eb8c..45371e9c 100644 --- a/packages/player/vite.config.ts +++ b/packages/player/vite.config.ts @@ -17,7 +17,7 @@ export default defineConfig({ build: { emptyOutDir: false, lib: { - entry: resolve(__dirname, "lib/index.ts"), + entry: resolve(__dirname, "src/index.ts"), fileName: "index", formats: ["es"], }, diff --git a/scripts/lint.sh b/scripts/lint.sh index 53f5e5fa..c6b1f661 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -1,7 +1,7 @@ -# api -eslint "packages/api/src/**/*.ts" -prettier --check "packages/api/src/**/*.ts" +echo "🎯 Running lint for packages/$1" -# artisan -eslint "packages/artisan/src/**/*.ts" -prettier --check "packages/artisan/src/**/*.ts" \ No newline at end of file +eslint "packages/$1/src/**/*.ts" +echo "✅ eslint" + +prettier --check "packages/$1/src/**/*.ts" +echo "✅ prettier" \ No newline at end of file