diff --git a/.changeset/clever-icons-cough.md b/.changeset/clever-icons-cough.md new file mode 100644 index 0000000000..ce9ce2361e --- /dev/null +++ b/.changeset/clever-icons-cough.md @@ -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. diff --git a/examples/minimal/package.json b/examples/minimal/package.json index f508783067..4071e0efbb 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -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", @@ -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": { diff --git a/examples/minimal/packages/contracts/worlds.json b/examples/minimal/packages/contracts/worlds.json index 5006b1be1d..2d47ae4158 100644 --- a/examples/minimal/packages/contracts/worlds.json +++ b/examples/minimal/packages/contracts/worlds.json @@ -4,6 +4,6 @@ "blockNumber": 21817970 }, "31337": { - "address": "0x6d584a9c0bd815104ab1fe92087c74450f7845d4" + "address": "0x6e9474e9c83676b9a71133ff96db43e7aa0a4342" } } \ No newline at end of file diff --git a/examples/minimal/pnpm-lock.yaml b/examples/minimal/pnpm-lock.yaml index f8856f3c92..8960110570 100644 --- a/examples/minimal/pnpm-lock.yaml +++ b/examples/minimal/pnpm-lock.yaml @@ -17,12 +17,12 @@ importers: '@typescript-eslint/parser': specifier: 5.46.1 version: 5.46.1(eslint@8.29.0)(typescript@5.1.6) - concurrently: - specifier: ^8.0.1 - version: 8.0.1 eslint: specifier: 8.29.0 version: 8.29.0 + mprocs: + specifier: ^0.6.4 + version: 0.6.4 typescript: specifier: 5.1.6 version: 5.1.6 @@ -588,13 +588,6 @@ packages: '@babel/helper-plugin-utils': 7.21.5 dev: true - /@babel/runtime@7.21.5: - resolution: {integrity: sha512-8jI69toZqqcsnqGGqwGS4Qb1VwLOEp4hz+CXPywcvjs60u3B4Pom/U/7rm4W8tMOYEB+E9wgD0mW1l3r8qlI9Q==} - engines: {node: '>=6.9.0'} - dependencies: - regenerator-runtime: 0.13.11 - dev: true - /@babel/template@7.20.7: resolution: {integrity: sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==} engines: {node: '>=6.9.0'} @@ -1569,15 +1562,6 @@ packages: wrap-ansi: 7.0.0 dev: false - /cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true - /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -1614,22 +1598,6 @@ packages: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true - /concurrently@8.0.1: - resolution: {integrity: sha512-Sh8bGQMEL0TAmAm2meAXMjcASHZa7V0xXQVDBLknCPa9TPtkY9yYs+0cnGGgfdkW0SV1Mlg+hVGfXcoI8d3MJA==} - engines: {node: ^14.13.0 || >=16.0.0} - hasBin: true - dependencies: - chalk: 4.1.2 - date-fns: 2.30.0 - lodash: 4.17.21 - rxjs: 7.8.1 - shell-quote: 1.8.1 - spawn-command: 0.0.2-1 - supports-color: 8.1.1 - tree-kill: 1.2.2 - yargs: 17.7.2 - dev: true - /convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} dev: true @@ -1674,13 +1642,6 @@ packages: resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} dev: true - /date-fns@2.30.0: - resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} - engines: {node: '>=0.11'} - dependencies: - '@babel/runtime': 7.21.5 - dev: true - /debug@4.3.4(supports-color@5.5.0): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -2140,6 +2101,7 @@ packages: /get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} + dev: false /get-intrinsic@1.2.0: resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==} @@ -2681,6 +2643,12 @@ packages: resolution: {integrity: sha512-1kBLBdSNG2bA522HQdbsTvwAwYf9hq9FWxmlhX7wTsJUAI54907J+ozfGW+LoYUo06vjit748g6QH1AAGLNebw==} dev: false + /mprocs@0.6.4: + resolution: {integrity: sha512-Y4eqnAjp3mjy0eT+zPoMQ+P/ISOzjgRG/4kh4I5cRA4Tv0rPxTCBRadn3+j+boMF5id7IoLhrVq9NFWFPuzD9A==} + engines: {node: '>=0.10.0'} + hasBin: true + dev: true + /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -3042,10 +3010,6 @@ packages: picomatch: 2.3.1 dev: true - /regenerator-runtime@0.13.11: - resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} - dev: true - /regexp.prototype.flags@1.5.0: resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==} engines: {node: '>= 0.4'} @@ -3063,6 +3027,7 @@ packages: /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} + dev: false /require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} @@ -3127,12 +3092,6 @@ packages: tslib: 2.5.0 dev: false - /rxjs@7.8.1: - resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} - dependencies: - tslib: 2.5.0 - dev: true - /safe-regex-test@1.0.0: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: @@ -3176,10 +3135,6 @@ packages: engines: {node: '>=8'} dev: true - /shell-quote@1.8.1: - resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} - dev: true - /side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: @@ -3250,10 +3205,6 @@ packages: whatwg-url: 7.1.0 dev: true - /spawn-command@0.0.2-1: - resolution: {integrity: sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==} - dev: true - /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -3366,13 +3317,6 @@ packages: has-flag: 4.0.0 dev: true - /supports-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} - dependencies: - has-flag: 4.0.0 - dev: true - /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -3493,6 +3437,7 @@ packages: /tslib@2.5.0: resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==} + dev: false /tsup@6.7.0(typescript@5.1.6): resolution: {integrity: sha512-L3o8hGkaHnu5TdJns+mCqFsDBo83bJ44rlK7e6VdanIvpea4ArPcU3swWGsLVbXak1PqQx/V+SSmFPujBK+zEQ==} @@ -3736,6 +3681,7 @@ packages: ansi-styles: 4.3.0 string-width: 4.2.3 strip-ansi: 6.0.1 + dev: false /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} @@ -3757,6 +3703,7 @@ packages: /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} + dev: false /yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} @@ -3776,11 +3723,6 @@ packages: engines: {node: '>=10'} dev: false - /yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - dev: true - /yargs@16.2.0: resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} engines: {node: '>=10'} @@ -3794,19 +3736,6 @@ packages: yargs-parser: 20.2.9 dev: false - /yargs@17.7.2: - resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} - engines: {node: '>=12'} - dependencies: - cliui: 8.0.1 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.1.1 - dev: true - /yn@3.1.1: resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} engines: {node: '>=6'} diff --git a/templates/phaser/mprocs.yaml b/templates/phaser/mprocs.yaml new file mode 100644 index 0000000000..89cf2bd606 --- /dev/null +++ b/templates/phaser/mprocs.yaml @@ -0,0 +1,7 @@ +procs: + contracts: + cwd: packages/contracts + shell: pnpm run dev + client: + cwd: packages/client + shell: pnpm run dev diff --git a/templates/phaser/package.json b/templates/phaser/package.json index 949e1a462f..76e3ee0c64 100644 --- a/templates/phaser/package.json +++ b/templates/phaser/package.json @@ -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", @@ -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" }, diff --git a/templates/react-ecs/mprocs.yaml b/templates/react-ecs/mprocs.yaml new file mode 100644 index 0000000000..89cf2bd606 --- /dev/null +++ b/templates/react-ecs/mprocs.yaml @@ -0,0 +1,7 @@ +procs: + contracts: + cwd: packages/contracts + shell: pnpm run dev + client: + cwd: packages/client + shell: pnpm run dev diff --git a/templates/react-ecs/package.json b/templates/react-ecs/package.json index 86636fec41..31e0b6abc2 100644 --- a/templates/react-ecs/package.json +++ b/templates/react-ecs/package.json @@ -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", @@ -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" }, diff --git a/templates/react/mprocs.yaml b/templates/react/mprocs.yaml new file mode 100644 index 0000000000..89cf2bd606 --- /dev/null +++ b/templates/react/mprocs.yaml @@ -0,0 +1,7 @@ +procs: + contracts: + cwd: packages/contracts + shell: pnpm run dev + client: + cwd: packages/client + shell: pnpm run dev diff --git a/templates/react/package.json b/templates/react/package.json index c881d45649..1fb18cbd70 100644 --- a/templates/react/package.json +++ b/templates/react/package.json @@ -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", @@ -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" }, diff --git a/templates/threejs/mprocs.yaml b/templates/threejs/mprocs.yaml new file mode 100644 index 0000000000..89cf2bd606 --- /dev/null +++ b/templates/threejs/mprocs.yaml @@ -0,0 +1,7 @@ +procs: + contracts: + cwd: packages/contracts + shell: pnpm run dev + client: + cwd: packages/client + shell: pnpm run dev diff --git a/templates/threejs/package.json b/templates/threejs/package.json index 4468366800..6d7aedfcb6 100644 --- a/templates/threejs/package.json +++ b/templates/threejs/package.json @@ -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", @@ -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" }, diff --git a/templates/vanilla/mprocs.yaml b/templates/vanilla/mprocs.yaml new file mode 100644 index 0000000000..89cf2bd606 --- /dev/null +++ b/templates/vanilla/mprocs.yaml @@ -0,0 +1,7 @@ +procs: + contracts: + cwd: packages/contracts + shell: pnpm run dev + client: + cwd: packages/client + shell: pnpm run dev diff --git a/templates/vanilla/package.json b/templates/vanilla/package.json index 98760174a6..f7fac27c2b 100644 --- a/templates/vanilla/package.json +++ b/templates/vanilla/package.json @@ -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", @@ -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" },