Skip to content

Commit

Permalink
refactor(store,world): use tsx for scripts rather than building them
Browse files Browse the repository at this point in the history
  • Loading branch information
dk1a committed Apr 20, 2023
1 parent 1c24ab5 commit 6f2f434
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/common/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default defineConfig({
target: "esnext",
},
ssr: {
noExternal: ["execa", "is-stream", "npm-run-path"],
noExternal: ["execa", "is-stream", "npm-run-path", "@latticexyz/solidity-parser"],
},
/**
* @see https://vitest.dev/config/
Expand Down
4 changes: 2 additions & 2 deletions packages/store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
},
"types": "ts/index.ts",
"scripts": {
"build": "pnpm run build:js && pnpm run build:tightcoder && pnpm run build:codegen && pnpm run build:abi && pnpm run build:typechain",
"build": "pnpm run build:tightcoder && pnpm run build:codegen && pnpm run build:abi && pnpm run build:typechain && pnpm run build:js",
"build:abi": "forge build --out abi --skip test script",
"build:codegen": "node ./dist/tablegen.js",
"build:codegen": "tsx ./ts/scripts/tablegen.ts",
"build:js": "vite build",
"build:tightcoder": "tsx ./ts/scripts/codegenTightcoder.ts && prettier --write '**/*.sol'",
"build:typechain": "typechain --target ethers-v5 'abi/**/*.sol/!(*.abi).json'",
Expand Down
2 changes: 1 addition & 1 deletion packages/store/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
build: {
ssr: true,
lib: {
entry: ["mud.config.ts", "ts/scripts/tablegen.ts", "ts/index.ts"],
entry: ["mud.config.ts", "ts/index.ts"],
formats: ["es"],
},
outDir: "dist",
Expand Down
4 changes: 2 additions & 2 deletions packages/world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
},
"types": "ts/index.ts",
"scripts": {
"build": "pnpm run build:js && pnpm run build:codegen && pnpm run build:abi && pnpm run build:typechain",
"build": "pnpm run build:codegen && pnpm run build:abi && pnpm run build:typechain && pnpm run build:js",
"build:abi": "forge build --out abi --skip test script",
"build:codegen": "node ./dist/tablegen.js && node ./dist/worldgen.js",
"build:codegen": "tsx ./ts/scripts/tablegen.ts && tsx ./ts/scripts/worldgen.ts",
"build:js": "vite build",
"build:typechain": "typechain --target ethers-v5 'abi/**/*.sol/!(*.abi).json'",
"clean": "pnpm run clean:abi && pnpm run clean:typechain && pnpm run clean:js",
Expand Down
2 changes: 1 addition & 1 deletion packages/world/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
build: {
ssr: true,
lib: {
entry: ["ts/scripts/worldgen.ts", "ts/scripts/tablegen.ts", "ts/index.ts", "mud.config.ts"],
entry: ["ts/index.ts", "mud.config.ts"],
formats: ["es"],
},
outDir: "dist",
Expand Down

0 comments on commit 6f2f434

Please sign in to comment.