Switch to use pnpm
This commit is contained in:
parent
4dea888769
commit
3458ef250d
6 changed files with 5797 additions and 6792 deletions
24
.github/workflows/push.yml
vendored
24
.github/workflows/push.yml
vendored
|
@ -15,23 +15,23 @@ jobs:
|
|||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v2.1.7
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
- name: Cache pnpm modules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
path: ~/.pnpm-store
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
${{ runner.os }}-
|
||||
|
||||
- uses: pnpm/action-setup@v2.2.1
|
||||
with:
|
||||
version: 7
|
||||
run_install: true
|
||||
|
||||
- name: Install
|
||||
run: yarn
|
||||
- name: Lint
|
||||
run: yarn lint
|
||||
run: pnpm lint
|
||||
- name: Build
|
||||
run: yarn build
|
||||
run: pnpm build
|
||||
|
||||
- name: Create Release
|
||||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
FROM --platform=$BUILDPLATFORM node:alpine AS builder
|
||||
WORKDIR /app
|
||||
|
||||
COPY yarn.lock package.json .
|
||||
RUN yarn config set network-timeout 300000 && yarn
|
||||
RUN npm i -g pnpm
|
||||
COPY pnpm-lock.yaml package.json .
|
||||
RUN pnpm i
|
||||
|
||||
COPY . .
|
||||
RUN yarn build \
|
||||
RUN pnpm build \
|
||||
# remove source maps - people like small image
|
||||
&& rm public/*.map || true
|
||||
|
||||
|
|
|
@ -26,14 +26,15 @@ The site [http://yacd.haishan.me](http://yacd.haishan.me) is served with HTTP no
|
|||
|
||||
```sh
|
||||
# install dependencies
|
||||
yarn
|
||||
# you may install pnpm with `npm i -g pnpm`
|
||||
pnpm i
|
||||
|
||||
# start the dev server
|
||||
# then go to http://127.0.0.1:3000
|
||||
yarn start
|
||||
pnpm start
|
||||
|
||||
|
||||
# build optimized assets
|
||||
# ready to deploy assets will be in the directory `public`
|
||||
yarn build
|
||||
pnpm build
|
||||
```
|
||||
|
|
92
package.json
92
package.json
|
@ -27,85 +27,85 @@
|
|||
"private": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "7.17.2",
|
||||
"@fontsource/open-sans": "4.5.5",
|
||||
"@fontsource/roboto-mono": "4.5.3",
|
||||
"@babel/runtime": "7.17.9",
|
||||
"@fontsource/open-sans": "4.5.8",
|
||||
"@fontsource/roboto-mono": "4.5.7",
|
||||
"@hsjs/react-cache": "0.0.0-alpha.aa94237",
|
||||
"@reach/tooltip": "0.16.2",
|
||||
"@reach/visually-hidden": "0.16.0",
|
||||
"@reach/tooltip": "0.17.0",
|
||||
"@reach/visually-hidden": "0.17.0",
|
||||
"chart.js": "2.9.4",
|
||||
"clsx": "^1.1.0",
|
||||
"core-js": "3.21.1",
|
||||
"core-js": "3.22.4",
|
||||
"date-fns": "2.28.0",
|
||||
"framer-motion": "6.2.8",
|
||||
"framer-motion": "6.3.3",
|
||||
"history": "5.3.0",
|
||||
"i18next": "21.6.13",
|
||||
"i18next-browser-languagedetector": "6.1.3",
|
||||
"i18next-http-backend": "1.3.2",
|
||||
"i18next": "21.7.1",
|
||||
"i18next-browser-languagedetector": "6.1.4",
|
||||
"i18next-http-backend": "1.4.0",
|
||||
"immer": "9.0.12",
|
||||
"invariant": "^2.2.4",
|
||||
"lodash-es": "^4.17.21",
|
||||
"memoize-one": "6.0.0",
|
||||
"modern-normalize": "1.1.0",
|
||||
"prop-types": "15.8.1",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2",
|
||||
"react": "18.1.0",
|
||||
"react-dom": "18.1.0",
|
||||
"react-feather": "^2.0.9",
|
||||
"react-i18next": "11.15.5",
|
||||
"react-i18next": "11.16.9",
|
||||
"react-icons": "4.3.1",
|
||||
"react-modal": "3.14.4",
|
||||
"react-query": "3.34.16",
|
||||
"react-router": "6.2.2",
|
||||
"react-router-dom": "6.2.2",
|
||||
"react-modal": "3.15.1",
|
||||
"react-query": "3.38.1",
|
||||
"react-router": "6.3.0",
|
||||
"react-router-dom": "6.3.0",
|
||||
"react-switch": "^6.0.0",
|
||||
"react-table": "7.7.0",
|
||||
"react-tabs": "4.0.1",
|
||||
"react-tabs": "5.1.0",
|
||||
"react-tiny-fab": "4.0.4",
|
||||
"react-window": "^1.8.5",
|
||||
"recoil": "0.6.1",
|
||||
"recoil": "0.7.3-alpha.1",
|
||||
"regenerator-runtime": "0.13.9",
|
||||
"reselect": "4.1.5",
|
||||
"tslib": "2.3.1",
|
||||
"workbox-core": "6.5.1",
|
||||
"workbox-expiration": "6.5.1",
|
||||
"workbox-precaching": "6.5.1",
|
||||
"workbox-routing": "6.5.1",
|
||||
"workbox-strategies": "6.5.1"
|
||||
"tslib": "2.4.0",
|
||||
"workbox-core": "6.5.3",
|
||||
"workbox-expiration": "6.5.3",
|
||||
"workbox-precaching": "6.5.3",
|
||||
"workbox-routing": "6.5.3",
|
||||
"workbox-strategies": "6.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/invariant": "2.2.35",
|
||||
"@types/jest": "27.4.1",
|
||||
"@types/jest": "27.5.0",
|
||||
"@types/lodash-es": "4.17.6",
|
||||
"@types/react": "17.0.39",
|
||||
"@types/react-dom": "17.0.13",
|
||||
"@types/react": "18.0.9",
|
||||
"@types/react-dom": "18.0.3",
|
||||
"@types/react-modal": "3.13.1",
|
||||
"@types/react-tabs": "2.3.4",
|
||||
"@types/react-tabs": "5.0.5",
|
||||
"@types/react-window": "1.8.5",
|
||||
"@typescript-eslint/eslint-plugin": "5.13.0",
|
||||
"@typescript-eslint/parser": "5.13.0",
|
||||
"@typescript-eslint/eslint-plugin": "5.22.0",
|
||||
"@typescript-eslint/parser": "5.22.0",
|
||||
"@vitejs/plugin-react-refresh": "1.3.6",
|
||||
"autoprefixer": "10.4.2",
|
||||
"cssnano": "5.1.0",
|
||||
"eslint": "8.10.0",
|
||||
"autoprefixer": "10.4.7",
|
||||
"cssnano": "5.1.7",
|
||||
"eslint": "8.15.0",
|
||||
"eslint-config-airbnb-base": "15.0.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-config-react-app": "7.0.0",
|
||||
"eslint-config-react-app": "7.0.1",
|
||||
"eslint-plugin-flowtype": "8.0.3",
|
||||
"eslint-plugin-import": "2.25.4",
|
||||
"eslint-plugin-jest": "26.1.1",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
"eslint-plugin-jest": "26.1.5",
|
||||
"eslint-plugin-jsx-a11y": "6.5.1",
|
||||
"eslint-plugin-react": "7.29.3",
|
||||
"eslint-plugin-react-hooks": "4.3.0",
|
||||
"eslint-plugin-react": "7.29.4",
|
||||
"eslint-plugin-react-hooks": "4.5.0",
|
||||
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||
"postcss": "8.4.7",
|
||||
"postcss": "8.4.13",
|
||||
"postcss-custom-media": "^8.0.0",
|
||||
"postcss-import": "14.0.2",
|
||||
"postcss-import": "14.1.0",
|
||||
"postcss-simple-vars": "^6.0.3",
|
||||
"prettier": "2.5.1",
|
||||
"prettier": "2.6.2",
|
||||
"resize-observer-polyfill": "^1.5.1",
|
||||
"sass": "1.49.9",
|
||||
"typescript": "4.6.2",
|
||||
"vite": "2.8.6",
|
||||
"vite-plugin-pwa": "0.11.13"
|
||||
"sass": "1.51.0",
|
||||
"typescript": "4.6.4",
|
||||
"vite": "2.9.8",
|
||||
"vite-plugin-pwa": "0.12.0"
|
||||
}
|
||||
}
|
||||
|
|
5731
pnpm-lock.yaml
Normal file
5731
pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue