Skip to content

Commit

Permalink
feat(create-mud): replace concurrently with mprocs (#1862)
Browse files Browse the repository at this point in the history
  • Loading branch information
holic committed Nov 2, 2023
1 parent b68e169 commit 6288f90
Show file tree
Hide file tree
Showing 14 changed files with 69 additions and 100 deletions.
5 changes: 5 additions & 0 deletions .changeset/clever-icons-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-mud": minor
---

Updated templates to use [mprocs](https://github.com/pvolok/mprocs) instead of [concurrently](https://github.com/open-cli-tools/concurrently) for running dev scripts.
8 changes: 4 additions & 4 deletions examples/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"scripts": {
"build": "pnpm recursive run build",
"clean": "pnpm recursive run clean",
"dev": "concurrently -n contracts,client -c cyan,magenta 'pnpm run dev:contracts' 'pnpm run dev:client-react'",
"dev-with-phaser": "concurrently -n contracts,client -c cyan,magenta 'pnpm run dev:contracts' 'pnpm run dev:client-phaser'",
"dev-with-vanilla": "concurrently -n contracts,client -c cyan,magenta 'pnpm run dev:contracts' 'pnpm run dev:client-vanilla'",
"dev": "mprocs 'pnpm run dev:contracts' 'pnpm run dev:client-react'",
"dev-with-phaser": "mprocs 'pnpm run dev:contracts' 'pnpm run dev:client-phaser'",
"dev-with-vanilla": "mprocs 'pnpm run dev:contracts' 'pnpm run dev:client-vanilla'",
"dev:client-phaser": "pnpm --filter 'client-phaser' run dev",
"dev:client-react": "pnpm --filter 'client-react' run dev",
"dev:client-vanilla": "pnpm --filter 'client-vanilla' run dev",
Expand All @@ -17,8 +17,8 @@
"@latticexyz/cli": "link:../../packages/cli",
"@typescript-eslint/eslint-plugin": "5.46.1",
"@typescript-eslint/parser": "5.46.1",
"concurrently": "^8.0.1",
"eslint": "8.29.0",
"mprocs": "^0.6.4",
"typescript": "5.1.6"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/packages/contracts/worlds.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"blockNumber": 21817970
},
"31337": {
"address": "0x6d584a9c0bd815104ab1fe92087c74450f7845d4"
"address": "0x6e9474e9c83676b9a71133ff96db43e7aa0a4342"
}
}
99 changes: 14 additions & 85 deletions examples/minimal/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions templates/phaser/mprocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
procs:
contracts:
cwd: packages/contracts
shell: pnpm run dev
client:
cwd: packages/client
shell: pnpm run dev
4 changes: 2 additions & 2 deletions templates/phaser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"build": "pnpm recursive run build",
"dev": "concurrently -n contracts,client -c cyan,magenta \"cd packages/contracts && pnpm run dev\" \"cd packages/client && pnpm run dev\"",
"dev": "mprocs",
"dev:client": "pnpm --filter 'client' run dev",
"dev:contracts": "pnpm --filter 'contracts' dev",
"foundry:up": "curl -L https://foundry.paradigm.xyz | bash && bash $HOME/.foundry/bin/foundryup",
Expand All @@ -15,8 +15,8 @@
"@latticexyz/cli": "link:../../packages/cli",
"@typescript-eslint/eslint-plugin": "5.46.1",
"@typescript-eslint/parser": "5.46.1",
"concurrently": "^8.0.1",
"eslint": "8.29.0",
"mprocs": "^0.6.4",
"rimraf": "^3.0.2",
"typescript": "5.1.6"
},
Expand Down
7 changes: 7 additions & 0 deletions templates/react-ecs/mprocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
procs:
contracts:
cwd: packages/contracts
shell: pnpm run dev
client:
cwd: packages/client
shell: pnpm run dev
4 changes: 2 additions & 2 deletions templates/react-ecs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"build": "pnpm recursive run build",
"dev": "concurrently -n contracts,client -c cyan,magenta \"cd packages/contracts && pnpm run dev\" \"cd packages/client && pnpm run dev\"",
"dev": "mprocs",
"dev:client": "pnpm --filter 'client' run dev",
"dev:contracts": "pnpm --filter 'contracts' dev",
"foundry:up": "curl -L https://foundry.paradigm.xyz | bash && bash $HOME/.foundry/bin/foundryup",
Expand All @@ -15,8 +15,8 @@
"@latticexyz/cli": "link:../../packages/cli",
"@typescript-eslint/eslint-plugin": "5.46.1",
"@typescript-eslint/parser": "5.46.1",
"concurrently": "^8.0.1",
"eslint": "8.29.0",
"mprocs": "^0.6.4",
"rimraf": "^3.0.2",
"typescript": "5.1.6"
},
Expand Down
7 changes: 7 additions & 0 deletions templates/react/mprocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
procs:
contracts:
cwd: packages/contracts
shell: pnpm run dev
client:
cwd: packages/client
shell: pnpm run dev
4 changes: 2 additions & 2 deletions templates/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"build": "pnpm recursive run build",
"dev": "concurrently -n contracts,client -c cyan,magenta \"cd packages/contracts && pnpm run dev\" \"cd packages/client && pnpm run dev\"",
"dev": "mprocs",
"dev:client": "pnpm --filter 'client' run dev",
"dev:contracts": "pnpm --filter 'contracts' dev",
"foundry:up": "curl -L https://foundry.paradigm.xyz | bash && bash $HOME/.foundry/bin/foundryup",
Expand All @@ -15,8 +15,8 @@
"@latticexyz/cli": "link:../../packages/cli",
"@typescript-eslint/eslint-plugin": "5.46.1",
"@typescript-eslint/parser": "5.46.1",
"concurrently": "^8.0.1",
"eslint": "8.29.0",
"mprocs": "^0.6.4",
"rimraf": "^3.0.2",
"typescript": "5.1.6"
},
Expand Down
7 changes: 7 additions & 0 deletions templates/threejs/mprocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
procs:
contracts:
cwd: packages/contracts
shell: pnpm run dev
client:
cwd: packages/client
shell: pnpm run dev
4 changes: 2 additions & 2 deletions templates/threejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"build": "pnpm recursive run build",
"dev": "concurrently -n contracts,client -c cyan,magenta \"cd packages/contracts && pnpm run dev\" \"cd packages/client && pnpm run dev\"",
"dev": "mprocs",
"dev:client": "pnpm --filter 'client' run dev",
"dev:contracts": "pnpm --filter 'contracts' dev",
"foundry:up": "curl -L https://foundry.paradigm.xyz | bash && bash $HOME/.foundry/bin/foundryup",
Expand All @@ -15,8 +15,8 @@
"@latticexyz/cli": "link:../../packages/cli",
"@typescript-eslint/eslint-plugin": "5.46.1",
"@typescript-eslint/parser": "5.46.1",
"concurrently": "^8.0.1",
"eslint": "8.29.0",
"mprocs": "^0.6.4",
"rimraf": "^3.0.2",
"typescript": "5.1.6"
},
Expand Down
7 changes: 7 additions & 0 deletions templates/vanilla/mprocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
procs:
contracts:
cwd: packages/contracts
shell: pnpm run dev
client:
cwd: packages/client
shell: pnpm run dev
Loading

0 comments on commit 6288f90

Please sign in to comment.