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
with:
node-version: 18
cache: 'yarn'
cache: 'pnpm'
- name: Install Yarn packages
run: yarn install
- name: Install pnpm packages
run: pnpm install
- name: Build project
run: yarn build
run: pnpm run build
- name: Upload production-ready build files
uses: actions/upload-artifact@v3

View file

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

4
.gitignore vendored
View file

@ -20,9 +20,9 @@ dev-dist
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# other package managers
yarn.lock
package-lock.json
# 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
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
git clone https://github.com/movie-web/movie-web
cd movie-web
yarn install
yarn dev
pnpm install
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)

View file

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

View file

@ -46,7 +46,8 @@
"preview": "vite preview",
"lint": "eslint --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": {
"production": [

6739
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load diff