mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
Update documentation to reflect removal of functions.json files
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
@@ -75,12 +75,6 @@
|
|||||||
"ComponentDefinition"
|
"ComponentDefinition"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"runtime": {
|
|
||||||
"scripts": [
|
|
||||||
"scripts/functions.json"
|
|
||||||
],
|
|
||||||
"main": "scripts/functions.json"
|
|
||||||
},
|
|
||||||
"tests": {
|
"tests": {
|
||||||
"suites": [
|
"suites": [
|
||||||
"tests/metadata.test.json"
|
"tests/metadata.test.json"
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ Added comprehensive static assets schema to MetaBuilder, enabling declarative ma
|
|||||||
3. `examples/complete-package/validation/validators.json` - Validation functions
|
3. `examples/complete-package/validation/validators.json` - Validation functions
|
||||||
4. `examples/complete-package/components/ui.json` - UI components
|
4. `examples/complete-package/components/ui.json` - UI components
|
||||||
5. `examples/complete-package/styles/tokens.json` - Design tokens
|
5. `examples/complete-package/styles/tokens.json` - Design tokens
|
||||||
6. `examples/complete-package/scripts/functions.json` - Business logic functions
|
6. `examples/advanced-features/scripts/automation.json` - Business logic scripts with implementations
|
||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
7. Updated `SCHEMAS_README.md` - Added assets schema section
|
7. Updated `SCHEMAS_README.md` - Added assets schema section
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ e-commerce-package/
|
|||||||
├── config/
|
├── config/
|
||||||
│ └── settings.json # config_schema.json (STRIPE_KEY, feature flags)
|
│ └── settings.json # config_schema.json (STRIPE_KEY, feature flags)
|
||||||
├── scripts/
|
├── scripts/
|
||||||
│ └── functions.json # script_schema.json
|
│ └── [script-name].json # script_schema.json (e.g., automation.json)
|
||||||
├── components/
|
├── components/
|
||||||
│ └── ui.json # components_schema.json
|
│ └── ui.json # components_schema.json
|
||||||
├── validation/
|
├── validation/
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ examples/
|
|||||||
├── minimal-package/ # Bare minimum example
|
├── minimal-package/ # Bare minimum example
|
||||||
│ ├── package.json
|
│ ├── package.json
|
||||||
│ ├── entities/schema.json
|
│ ├── entities/schema.json
|
||||||
│ └── scripts/functions.json
|
│ └── scripts/index.json # Simple script examples
|
||||||
├── complete-package/ # Full-featured example
|
├── complete-package/ # Full-featured example
|
||||||
│ ├── package.json
|
│ ├── package.json
|
||||||
│ ├── entities/schema.json
|
│ ├── entities/schema.json
|
||||||
@@ -336,7 +336,7 @@ examples/
|
|||||||
1. `examples/README.md`
|
1. `examples/README.md`
|
||||||
2. `examples/minimal-package/package.json`
|
2. `examples/minimal-package/package.json`
|
||||||
3. `examples/minimal-package/entities/schema.json`
|
3. `examples/minimal-package/entities/schema.json`
|
||||||
4. `examples/minimal-package/scripts/functions.json`
|
4. `examples/minimal-package/scripts/index.json`
|
||||||
5. `examples/complete-package/package.json`
|
5. `examples/complete-package/package.json`
|
||||||
6. `examples/complete-package/entities/schema.json`
|
6. `examples/complete-package/entities/schema.json`
|
||||||
7. `examples/complete-package/types/index.json`
|
7. `examples/complete-package/types/index.json`
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ my-package/
|
|||||||
├── types/
|
├── types/
|
||||||
│ └── index.json # types_schema.json
|
│ └── index.json # types_schema.json
|
||||||
├── scripts/
|
├── scripts/
|
||||||
│ └── functions.json # script_schema.json
|
│ └── [script-name].json # script_schema.json (e.g., automation.json)
|
||||||
├── components/
|
├── components/
|
||||||
│ └── ui.json # components_schema.json
|
│ └── ui.json # components_schema.json
|
||||||
├── validation/
|
├── validation/
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ The simplest valid MetaBuilder package with only required fields.
|
|||||||
**Files included:**
|
**Files included:**
|
||||||
- `package.json` - Basic metadata
|
- `package.json` - Basic metadata
|
||||||
- `entities/schema.json` - Single User entity
|
- `entities/schema.json` - Single User entity
|
||||||
- `scripts/functions.json` - Simple greeting function
|
- `scripts/index.json` - Simple script examples
|
||||||
|
|
||||||
**Purpose:** Quick start template, understanding minimum requirements
|
**Purpose:** Quick start template, understanding minimum requirements
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ The simplest valid MetaBuilder package with only required fields.
|
|||||||
cd minimal-package
|
cd minimal-package
|
||||||
../../schema_validator.sh package.json
|
../../schema_validator.sh package.json
|
||||||
../../schema_validator.sh entities/schema.json
|
../../schema_validator.sh entities/schema.json
|
||||||
../../schema_validator.sh scripts/functions.json
|
../../schema_validator.sh scripts/index.json
|
||||||
```
|
```
|
||||||
|
|
||||||
## Complete Package
|
## Complete Package
|
||||||
|
|||||||
@@ -352,7 +352,7 @@
|
|||||||
"package.json": "metadata",
|
"package.json": "metadata",
|
||||||
"entities/schema.json": "entities",
|
"entities/schema.json": "entities",
|
||||||
"types/index.json": "types",
|
"types/index.json": "types",
|
||||||
"scripts/functions.json": "script",
|
"scripts/*.json": "script",
|
||||||
"components/ui.json": "components",
|
"components/ui.json": "components",
|
||||||
"validation/validators.json": "validation",
|
"validation/validators.json": "validation",
|
||||||
"styles/tokens.json": "styles",
|
"styles/tokens.json": "styles",
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ packages/
|
|||||||
styles/
|
styles/
|
||||||
index.json # Style definitions (schema: styles_schema.json)
|
index.json # Style definitions (schema: styles_schema.json)
|
||||||
scripts/
|
scripts/
|
||||||
functions.json # Script definitions (schema: script_schema.json)
|
[script-name].json # Script definitions (schema: script_schema.json, e.g., automation.json)
|
||||||
types/
|
types/
|
||||||
index.json # Type definitions (schema: types_schema.json)
|
index.json # Type definitions (schema: types_schema.json)
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ Test packages with different user contexts:
|
|||||||
|
|
||||||
## How It Works
|
## How It Works
|
||||||
|
|
||||||
1. **JSON script packages** in `/packages/*/seed/scripts/functions.json` define UI component trees
|
1. **JSON script packages** in `/packages/*/seed/scripts/` define UI component trees
|
||||||
2. **Mock data** mirrors the output structure produced by the JSON scripts
|
2. **Mock data** mirrors the output structure produced by the JSON scripts
|
||||||
3. **PackageRenderer** (still the runtime entry) converts the component tree to React components
|
3. **PackageRenderer** (still the runtime entry) converts the component tree to React components
|
||||||
4. **Component Registry** maps package-defined type names to React implementations
|
4. **Component Registry** maps package-defined type names to React implementations
|
||||||
@@ -52,10 +52,10 @@ Each JSON script package follows this structure:
|
|||||||
packages/
|
packages/
|
||||||
└── {package_name}/
|
└── {package_name}/
|
||||||
└── seed/
|
└── seed/
|
||||||
├── metadata.json # Package info
|
├── metadata.json # Package info
|
||||||
├── components.json # Component definitions
|
├── components.json # Component definitions
|
||||||
└── scripts/
|
└── scripts/
|
||||||
└── functions.json # JSON script definitions
|
└── [script-name].json # JSON script definitions (e.g., automation.json)
|
||||||
```
|
```
|
||||||
|
|
||||||
## JSON Script Output
|
## JSON Script Output
|
||||||
|
|||||||
Reference in New Issue
Block a user