mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-28 08:16:06 +00:00
move to pnpm
This commit is contained in:
parent
984e75d82f
commit
89d5c65b18
8
.github/workflows/deploying.yml
vendored
8
.github/workflows/deploying.yml
vendored
|
@ -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
|
||||||
|
|
16
.github/workflows/linting_testing.yml
vendored
16
.github/workflows/linting_testing.yml
vendored
|
@ -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
4
.gitignore
vendored
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
13
dockerfile
13
dockerfile
|
@ -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
|
||||||
|
|
|
@ -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
6739
pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue