Skip to content

Commit

Permalink
yarn to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
shuji-koike committed Jan 27, 2024
1 parent b0871f4 commit 49fea72
Show file tree
Hide file tree
Showing 19 changed files with 15,298 additions and 11,255 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version: "20"
- uses: actions/cache@v4
id: cache_node_modules
with:
path: "**/node_modules"
key: node_modules-${{ hashFiles('**/package.json', 'yarn.lock') }}
- run: yarn install --frozen-lockfile
if: steps.cache_node_modules.outputs.cache-hit != 'true'
cache: "pnpm"
- uses: actions/setup-go@v5
with:
go-version: "1.21"
Expand All @@ -28,15 +23,15 @@ jobs:
key: go_mod-${{ hashFiles('go.sum') }}
- run: go get
if: steps.cache_go_mod.outputs.cache-hit != 'true'
- run: yarn tsc --noEmit
- run: go build -o ./static/main.wasm .
env:
GOOS: js
GOARCH: wasm
- run: touch ./static/sample.dem.json
- run: yarn vite build
- run: yarn tsc --noEmit false
- run: pnpm install
- run: npx vite build
- run: npx tsx build.ts
working-directory: packages/functions
- run: yarn firebase deploy --force --project ${{ secrets.FIREBASE_PROJECT_ID }}
- run: npx firebase deploy --force --only firestore
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
16 changes: 6 additions & 10 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version: "20"
- uses: actions/cache@v4
id: cache_node_modules
with:
path: "**/node_modules"
key: node_modules-${{ hashFiles('**/package.json', 'yarn.lock') }}
- run: yarn install --frozen-lockfile
if: steps.cache_node_modules.outputs.cache-hit != 'true'
- run: yarn prettier -c .
- run: yarn eslint .
- run: yarn tsc --noEmit
cache: "pnpm"
- run: pnpm install
- run: npx prettier -c .
- run: npx eslint .
- run: npx tsc --noEmit
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.*
!.storybook
/functions/lib
/dist
dist
/static
/var
/csgo
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ build
static/wasm_exec.js
static/*.json
**/icons.json
pnpm-lock.yaml
12 changes: 2 additions & 10 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,8 @@
"request": "launch",
"name": "yarn start",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "yarn",
"runtimeArgs": ["start"]
},
{
"type": "node",
"request": "launch",
"name": "yarn storybook",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "yarn",
"runtimeArgs": ["storybook"]
"runtimeExecutable": "pnpm",
"runtimeArgs": ["run", "start"]
}
]
}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@ This project is open source but not a free software, and temporary licensed as

- [Counter-Strike: Global Offensive](https://blog.counter-strike.net/)
- https://www.hltv.org/

# setup

```
pnpm install
touch ./static/sample.dem.json
GOOS=js GOARCH=wasm go build -o ./static/main.wasm .
```
19 changes: 15 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,32 @@
"engines": {
"node": "20"
},
"packageManager": "pnpm@8.14.3",
"scripts": {
"start": "vite dev",
"build": "vite build",
"lint": "eslint --cache --fix .; prettier --write --loglevel warn .;tsc --noEmit",
"storybook": "start-storybook -p 6006"
},
"workspaces": [
"packages/*"
],
"devDependencies": {
"@emotion/react": "^11.11.3",
"@firebase/app-compat": "^0.2.26",
"@shuji-koike/boilerplate": "^1.24.0",
"@shuji-koike/eslint-config": "^1.24.0",
"@shuji-koike/storybook": "^1.24.0",
"@shuji-koike/vite-react": "^1.24.0",
"firebase-tools": "^13.1.0"
"@types/lodash": "^4.14.202",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@types/react-router-dom": "^5.3.3",
"@vitejs/plugin-react": "^4.2.1",
"firebase-tools": "^13.1.0",
"lodash": "^4.17.21",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "^6.21.3",
"react-router-dom": "^6.21.3",
"typescript": "^5.3.3",
"vite": "^5.0.12"
}
}
1 change: 1 addition & 0 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@mui/material": "^5.15.6",
"@sentry/react": "^7.98.0",
"@sentry/tracing": "^7.98.0",
"@shuji-koike/boilerplate": "^1.24.0",
"firebase": "^10.7.2",
"lodash": "^4.17.21",
"react": "^18.2.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/app/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export const Home: React.FC = () => {
const path = /\.dem$/i.test(name)
? await storagePutPublicMatch(match, name)
: name
navigate(`/dem/${path}/`, { state: { match } })
console.info(path)
// navigate(`/dem/${path}/`, { state: { match } })
}}
/>
{import.meta.env.DEV && (
Expand Down
Loading

0 comments on commit 49fea72

Please sign in to comment.