From 1fe57dea0553ab89ea1ecca0d4fe0cc8281ca09d Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Tue, 30 Jul 2024 16:30:14 +0100 Subject: [PATCH] docs: update namespaces changeset (#2989) --- .changeset/seven-melons-kneel.md | 41 ++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/.changeset/seven-melons-kneel.md b/.changeset/seven-melons-kneel.md index 3366d99e76..93db0c55e9 100644 --- a/.changeset/seven-melons-kneel.md +++ b/.changeset/seven-melons-kneel.md @@ -11,9 +11,20 @@ import { defineWorld } from "@latticexyz/world"; export default defineWorld({ namespaces: { - app: { - tables: { ... }, - systems: { ... }, + game: { + tables: { + Player: { ... }, + Position: { ... }, + }, + }, + guilds: { + tables: { + Guild: { ... }, + }, + systems: { + MembershipSystem: { ... }, + TreasurySystem: { ... }, + }, }, }, }); @@ -22,13 +33,19 @@ export default defineWorld({ Once you use the top-level `namespaces` config option, your project will be in "multiple namespaces mode", which expects a source directory structure similar to the config structure: a top-level `namespaces` directory with nested namespace directories that correspond to each namespace label in the config. ``` -mud-project/ -├─ mud.config.ts -└─ src/ - └─ namespaces/ - └─ app/ - ├─ TasksSystem.sol - └─ codegen/ - ├─ tables/ - └─ Tasks.sol +~/guilds +├── mud.config.ts +└── src + └── namespaces + ├── game + │   └── codegen + │   └── tables + │   ├── Player.sol + │   └── Position.sol + └── guilds + ├── MembershipSystem.sol + ├── TreasurySystem.sol + └── codegen + └── tables + └── Guild.sol ```