1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-29 16:07:40 +01:00

move to pnpm

This commit is contained in:
mrjvs 2023-09-01 15:27:55 +02:00
parent 984e75d82f
commit 89d5c65b18
7 changed files with 6768 additions and 23 deletions

View file

@ -18,13 +18,13 @@ jobs:
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 18 node-version: 18
cache: 'yarn' cache: 'pnpm'
- name: Install Yarn packages - name: Install pnpm packages
run: yarn install run: pnpm install
- name: Build project - name: Build project
run: yarn build run: pnpm run build
- name: Upload production-ready build files - name: Upload production-ready build files
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3

View file

@ -20,13 +20,13 @@ jobs:
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 18 node-version: 18
cache: 'yarn' cache: 'pnpm'
- name: Install Yarn packages - name: Install pnpm packages
run: yarn install run: pnpm install
- name: Run ESLint - name: Run ESLint
run: yarn lint run: pnpm run lint
building: building:
name: Build project name: Build project
@ -40,10 +40,10 @@ jobs:
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 18 node-version: 18
cache: 'yarn' cache: 'pnpm'
- name: Install Yarn packages - name: Install pnpm packages
run: yarn install run: pnpm install
- name: Build Project - name: Build Project
run: yarn build run: pnpm run build

4
.gitignore vendored
View file

@ -20,9 +20,9 @@ dev-dist
.env.production.local .env.production.local
npm-debug.log* npm-debug.log*
yarn-debug.log*
yarn-error.log*
# other package managers
yarn.lock
package-lock.json package-lock.json
# config # config

View file

@ -34,16 +34,16 @@ Check it out here: [https://github.com/movie-web/movie-web/blob/dev/SELFHOSTING.
## Running locally for development ## Running locally for development
To run this project locally for contributing or testing, run the following commands: To run this project locally for contributing or testing, run the following commands:
<h5><b>note: must use yarn to install packages and run NodeJS 16</b></h5> <h5><b>note: must use pnpm to install packages and run NodeJS 16 (install with `npm i -g pnpm`)</b></h5>
```bash ```bash
git clone https://github.com/movie-web/movie-web git clone https://github.com/movie-web/movie-web
cd movie-web cd movie-web
yarn install pnpm install
yarn dev pnpm run dev
``` ```
To build production files, simply run `yarn build`. To build production files, simply run `pnpm run build`.
You'll need to deploy a cloudflare service worker as well. Check the [selfhosting guide](https://github.com/movie-web/movie-web/blob/dev/SELFHOSTING.md) on how to run the service worker. Afterwards you can make a `.env` file and put in the URL. (see `example.env` for an example) You'll need to deploy a cloudflare service worker as well. Check the [selfhosting guide](https://github.com/movie-web/movie-web/blob/dev/SELFHOSTING.md) on how to run the service worker. Afterwards you can make a `.env` file and put in the URL. (see `example.env` for an example)

View file

@ -1,10 +1,15 @@
FROM node:16.15-alpine as build FROM node:16.15-alpine as build
WORKDIR /app WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH ENV PNPM_HOME="/pnpm"
COPY package*.json ./ ENV PATH="$PNPM_HOME:$PATH"
RUN yarn install RUN corepack enable
COPY package.json ./
COPY pnpm-lock.yaml ./
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
COPY . ./ COPY . ./
RUN yarn build RUN pnpm run build
# production environment # production environment
FROM nginx:stable-alpine FROM nginx:stable-alpine

View file

@ -46,7 +46,8 @@
"preview": "vite preview", "preview": "vite preview",
"lint": "eslint --ext .tsx,.ts src", "lint": "eslint --ext .tsx,.ts src",
"lint:fix": "eslint --fix --ext .tsx,.ts src", "lint:fix": "eslint --fix --ext .tsx,.ts src",
"lint:report": "eslint --ext .tsx,.ts --output-file eslint_report.json --format json src" "lint:report": "eslint --ext .tsx,.ts --output-file eslint_report.json --format json src",
"preinstall": "npx only-allow pnpm"
}, },
"browserslist": { "browserslist": {
"production": [ "production": [

6739
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load diff