mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-12 12:06:16 -08:00
chore: switch to pnpm
This commit is contained in:
1 parent
f8b8464c4a
commit
61d34aef7a
11 files changed
+38
-46050
No files matched your search
@@ -62,13 +62,13 @@ jobs:
|
||||
flatpak install --user -y flathub org.freedesktop.Platform//24.08 org.freedesktop.Sdk//24.08
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --no-frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build frontend
|
||||
run: npx nx build web --skip-nx-cache
|
||||
run: pnpm nx build web --skip-nx-cache
|
||||
|
||||
- name: Build backend
|
||||
run: npm run build:backend
|
||||
run: pnpm run build:backend
|
||||
|
||||
- name: Override macOS arch in electron-builder.json
|
||||
if: matrix.os == 'macos'
|
||||
@@ -82,7 +82,7 @@ jobs:
|
||||
"
|
||||
|
||||
- name: Make Electron app
|
||||
run: npm run make:app
|
||||
run: pnpm run make:app
|
||||
|
||||
- name: Upload artifacts (macOS)
|
||||
if: matrix.os == 'macos'
|
||||
|
||||
@@ -38,10 +38,10 @@ jobs:
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --no-frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build website
|
||||
run: npx nx build website
|
||||
run: pnpm nx build website
|
||||
|
||||
- name: Upload Pages artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
|
||||
@@ -34,23 +34,23 @@ jobs:
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install Dependencies
|
||||
run: pnpm install --no-frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build Backend
|
||||
run: npx nx build electron-backend
|
||||
run: pnpm nx build electron-backend
|
||||
|
||||
- name: Install Playwright Browsers
|
||||
run: npx playwright install --with-deps
|
||||
run: pnpm exec playwright install --with-deps
|
||||
|
||||
- name: Run E2E Tests (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" npx nx run electron-backend-e2e:e2e
|
||||
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" pnpm nx run electron-backend-e2e:e2e
|
||||
env:
|
||||
CI: true
|
||||
|
||||
- name: Run E2E Tests (Windows/Mac)
|
||||
if: runner.os != 'Linux'
|
||||
run: npx nx run electron-backend-e2e:e2e
|
||||
run: pnpm nx run electron-backend-e2e:e2e
|
||||
env:
|
||||
CI: true
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ server.js
|
||||
|
||||
# dependencies
|
||||
node_modules
|
||||
package-lock.json
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
|
||||
@@ -14,42 +14,42 @@ IPTVnator is a cross-platform IPTV player application built with Angular and Ele
|
||||
|
||||
```bash
|
||||
# Serve the Angular web app only (development mode, baseHref="/")
|
||||
npm run serve:frontend
|
||||
pnpm run serve:frontend
|
||||
# or
|
||||
nx serve web
|
||||
|
||||
# Serve with PWA configuration (optimized, baseHref="/")
|
||||
npm run serve:frontend:pwa
|
||||
pnpm run serve:frontend:pwa
|
||||
# or
|
||||
nx serve web --configuration=pwa
|
||||
|
||||
# Serve the Electron app (starts both frontend and backend)
|
||||
npm run serve:backend
|
||||
pnpm run serve:backend
|
||||
# or
|
||||
nx serve electron-backend
|
||||
|
||||
# Build frontend for Electron (baseHref="./")
|
||||
npm run build:frontend
|
||||
pnpm run build:frontend
|
||||
# or
|
||||
nx build web
|
||||
|
||||
# Build frontend for PWA deployment (baseHref="/")
|
||||
npm run build:frontend:pwa
|
||||
pnpm run build:frontend:pwa
|
||||
# or
|
||||
nx build web --configuration=pwa
|
||||
|
||||
# Build backend (Electron)
|
||||
npm run build:backend
|
||||
pnpm run build:backend
|
||||
# or
|
||||
nx build electron-backend
|
||||
|
||||
# Package the app (creates distributable without installers)
|
||||
npm run package:app
|
||||
pnpm run package:app
|
||||
# or
|
||||
nx run electron-backend:package
|
||||
|
||||
# Create installers/executables
|
||||
npm run make:app
|
||||
pnpm run make:app
|
||||
# or
|
||||
nx run electron-backend:make
|
||||
```
|
||||
@@ -58,12 +58,12 @@ nx run electron-backend:make
|
||||
|
||||
```bash
|
||||
# Run frontend tests
|
||||
npm run test:frontend
|
||||
pnpm run test:frontend
|
||||
# or
|
||||
nx test web
|
||||
|
||||
# Run backend tests
|
||||
npm run test:backend
|
||||
pnpm run test:backend
|
||||
# or
|
||||
nx test electron-backend
|
||||
|
||||
@@ -434,10 +434,10 @@ IPTVnator supports both Electron (desktop app) and PWA (web browser) to provide
|
||||
The app uses different base href values depending on the build target:
|
||||
|
||||
- **Development & PWA**: `baseHref="/"` (from `index.html`)
|
||||
- Used by: `npm run serve:frontend`, `npm run build:frontend:pwa`
|
||||
- Used by: `pnpm run serve:frontend`, `pnpm run build:frontend:pwa`
|
||||
- For web servers with proper routing
|
||||
- **Electron Production**: `baseHref="./"` (overridden in build config)
|
||||
- Used by: `npm run build:backend`, `npm run make:app`
|
||||
- Used by: `pnpm run build:backend`, `pnpm run make:app`
|
||||
- Required for `file://` protocol in Electron
|
||||
|
||||
Build configurations in `apps/web/project.json`:
|
||||
|
||||
@@ -169,17 +169,18 @@ iptvnator --no-sandbox
|
||||
|
||||
Requirements:
|
||||
|
||||
- Node.js with npm
|
||||
- Node.js with pnpm (via Corepack)
|
||||
|
||||
1. Clone this repository and install project dependencies:
|
||||
|
||||
```
|
||||
$ npm install
|
||||
$ corepack enable
|
||||
$ pnpm install
|
||||
```
|
||||
|
||||
2. Start the application:
|
||||
```
|
||||
$ npm run serve:backend
|
||||
$ pnpm run serve:backend
|
||||
```
|
||||
|
||||
This will open the Electron app in a separate window, while the Angular dev server will run at http://localhost:4200.
|
||||
@@ -187,7 +188,7 @@ This will open the Electron app in a separate window, while the Angular dev serv
|
||||
To run only the Angular app without Electron, use:
|
||||
|
||||
```
|
||||
$ npm run serve:frontend
|
||||
$ pnpm run serve:frontend
|
||||
```
|
||||
|
||||
## Disclaimer
|
||||
|
||||
@@ -24,7 +24,7 @@ export default defineConfig({
|
||||
},
|
||||
/* Run your local dev server before starting the tests */
|
||||
webServer: {
|
||||
command: 'npx nx run web:serve',
|
||||
command: 'pnpm nx run web:serve',
|
||||
url: 'http://localhost:4200',
|
||||
reuseExistingServer: true,
|
||||
cwd: workspaceRoot,
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
"outputs": ["{workspaceRoot}/dist/apps/website"],
|
||||
"inputs": ["production", "^production"],
|
||||
"options": {
|
||||
"command": "npx astro build",
|
||||
"command": "pnpm exec astro build",
|
||||
"cwd": "apps/website"
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"command": "npx astro dev --port 4321",
|
||||
"command": "pnpm exec astro dev --port 4321",
|
||||
"cwd": "apps/website"
|
||||
}
|
||||
},
|
||||
@@ -25,7 +25,7 @@
|
||||
"executor": "nx:run-commands",
|
||||
"dependsOn": ["build"],
|
||||
"options": {
|
||||
"command": "npx astro preview --port 4322",
|
||||
"command": "pnpm exec astro preview --port 4322",
|
||||
"cwd": "apps/website"
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -11,16 +11,16 @@ WORKDIR /usr/src/app
|
||||
#USER node
|
||||
|
||||
COPY .npmrc ./
|
||||
COPY package*.json ./
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
|
||||
# Install app dependencies
|
||||
RUN npm ci
|
||||
RUN corepack enable && pnpm install --frozen-lockfile
|
||||
|
||||
# Copy all required files
|
||||
COPY . .
|
||||
|
||||
# Build the application
|
||||
RUN npm run build:web
|
||||
RUN pnpm run build:web
|
||||
|
||||
# Stage 2 - the production environment
|
||||
FROM nginx:stable-alpine
|
||||
@@ -29,4 +29,4 @@ FROM nginx:stable-alpine
|
||||
COPY --from=build /usr/src/app/dist/browser /usr/share/nginx/html
|
||||
COPY --from=build /usr/src/app/docker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
CMD sed -i "s#http://localhost:3333#$BACKEND_URL#g" /usr/share/nginx/html/main.js && nginx -g 'daemon off;'
|
||||
CMD sed -i "s#http://localhost:3333#$BACKEND_URL#g" /usr/share/nginx/html/main.js && nginx -g 'daemon off;'
|
||||
Generated
-46015
File diff suppressed because it is too large.
Load diff
@@ -35,6 +35,7 @@
|
||||
"build:website": "nx build website"
|
||||
},
|
||||
"private": true,
|
||||
"packageManager": "pnpm@10.17.1",
|
||||
"dependencies": {
|
||||
"@angular/animations": "^20.3.10",
|
||||
"@angular/cdk": "^20.2.12",
|
||||
|
||||
Reference in new issue
Block a user