Skip to content

Commit

Permalink
feat(store,world): separate v2 config export (#2422)
Browse files Browse the repository at this point in the history
  • Loading branch information
holic authored Mar 13, 2024
1 parent 154c7f7 commit aea096b
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 4 deletions.
4 changes: 4 additions & 0 deletions packages/store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"./mud.config": "./dist/mud.config.js",
"./codegen": "./dist/ts/codegen/index.js",
"./config": "./dist/ts/config/index.js",
"./config/v2": "./dist/ts/config/v2/index.js",
"./register": "./dist/ts/register/index.js",
"./out/*": "./out/*"
},
Expand All @@ -28,6 +29,9 @@
"config": [
"./ts/config/index.ts"
],
"config/v2": [
"./ts/config/v2/index.ts"
],
"register": [
"./ts/register/index.ts"
]
Expand Down
1 change: 0 additions & 1 deletion packages/store/ts/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ export * from "./defaults";
export * from "./storeConfig";

export * from "./experimental/resolveConfig";
export * from "./v2";
9 changes: 8 additions & 1 deletion packages/store/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { defineConfig } from "tsup";

export default defineConfig({
entry: ["mud.config.ts", "ts/index.ts", "ts/codegen/index.ts", "ts/config/index.ts", "ts/register/index.ts"],
entry: [
"mud.config.ts",
"ts/index.ts",
"ts/codegen/index.ts",
"ts/config/index.ts",
"ts/config/v2/index.ts",
"ts/register/index.ts",
],
target: "esnext",
format: ["esm"],
dts: true,
Expand Down
4 changes: 4 additions & 0 deletions packages/world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"exports": {
".": "./dist/ts/index.js",
"./mud.config": "./dist/mud.config.js",
"./config/v2": "./dist/ts/config/v2/index.js",
"./register": "./dist/ts/register/index.js",
"./node": "./dist/ts/node/index.js",
"./out/*": "./out/*"
Expand All @@ -21,6 +22,9 @@
"index": [
"./ts/index.ts"
],
"config/v2": [
"./ts/config/v2/index.ts"
],
"register": [
"./ts/register/index.ts"
],
Expand Down
1 change: 1 addition & 0 deletions packages/world/ts/config/v2/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./world";
2 changes: 1 addition & 1 deletion packages/world/ts/config/v2/world.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
resolveTableConfig,
AbiTypeScope,
get,
} from "@latticexyz/store/config";
} from "@latticexyz/store/config/v2";

export type WorldConfigInput<userTypes extends UserTypes = UserTypes, enums extends Enums = Enums> = evaluate<
StoreConfigInput<userTypes, enums> & {
Expand Down
2 changes: 1 addition & 1 deletion packages/world/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineConfig } from "tsup";

export default defineConfig({
entry: ["mud.config.ts", "ts/index.ts", "ts/register/index.ts", "ts/node/index.ts"],
entry: ["mud.config.ts", "ts/index.ts", "ts/register/index.ts", "ts/config/v2/index.ts", "ts/node/index.ts"],
target: "esnext",
format: ["esm"],
dts: true,
Expand Down

0 comments on commit aea096b

Please sign in to comment.