Skip to content

Commit

Permalink
chore: migrate package management to pnpm (Power-Playground#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
nonzzz authored Sep 20, 2023
1 parent 9ebe010 commit 362e49b
Show file tree
Hide file tree
Showing 8 changed files with 3,394 additions and 2,986 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,27 @@ jobs:
contents: write

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install pnpm
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'pnpm'

- name: Cache dependencies
uses: actions/cache@v2
id: yarn-cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
run: pnpm install --no-frozen-lockfile && node scripts/bootstrap.mjs

- name: Build site
env:
BASE_URL: app
run: |
yarn build
pnpm build
tar -czvf dist.tar.gz dist vercel.json
- name: upload dist and vercel.json
Expand Down Expand Up @@ -105,7 +99,7 @@ jobs:
with:
node-version: '18'
- name: Install Vercel CLI
run: yarn global add vercel
run: pnpm add -g vercel

- name: Deploy to Vercel
env:
Expand Down
1 change: 1 addition & 0 deletions core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
},
"devDependencies": {
"@monaco-editor/react": "^4.5.1",
"@monaco-editor/loader":"^1.3.3",
"@types/babel__core": "^7.20.1",
"@types/babel__standalone": "^7.1.4",
"@types/ramda": "^0.29.3",
Expand Down
13 changes: 4 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@
"repository": "[email protected]:Power-Playground/app.git",
"author": "YiJie <[email protected]>",
"license": "MIT",
"workspaces": [
"core",
"vite-plugins/*",
"external/zodui/packages/core",
"external/zodui/packages/react",
"external/zodui/packages/plugins/*"
],
"packageManager": "[email protected]",
"scripts": {
"serve": "vite",
"build": "vite build",
"build:watch": "vite build --watch",
"build:replacer": "yarn --cwd vite-plugins/replacer build",
"build:replacer": "pnpm --dir ./vite-plugins/replacer build",
"preview": "vite preview",
"bootstrap": "node scripts/bootstrap.mjs"
},
Expand Down Expand Up @@ -49,7 +43,8 @@
"typescript": "^5.1.6",
"vite": "^4.4.0",
"vite-plugin-cdn2": "^0.12.0",
"vite-plugin-inspect": "^0.7.38"
"vite-plugin-inspect": "^0.7.38",
"@power-playground/core":"workspace:*"
},
"engines": {
"node": ">=18.16.0"
Expand Down
Loading

0 comments on commit 362e49b

Please sign in to comment.