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"
|
||||
]
|
||||
},
|
||||
"runtime": {
|
||||
"scripts": [
|
||||
"scripts/functions.json"
|
||||
],
|
||||
"main": "scripts/functions.json"
|
||||
},
|
||||
"tests": {
|
||||
"suites": [
|
||||
"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
|
||||
4. `examples/complete-package/components/ui.json` - UI components
|
||||
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
|
||||
7. Updated `SCHEMAS_README.md` - Added assets schema section
|
||||
|
||||
@@ -278,7 +278,7 @@ e-commerce-package/
|
||||
├── config/
|
||||
│ └── settings.json # config_schema.json (STRIPE_KEY, feature flags)
|
||||
├── scripts/
|
||||
│ └── functions.json # script_schema.json
|
||||
│ └── [script-name].json # script_schema.json (e.g., automation.json)
|
||||
├── components/
|
||||
│ └── ui.json # components_schema.json
|
||||
├── validation/
|
||||
|
||||
@@ -68,7 +68,7 @@ examples/
|
||||
├── minimal-package/ # Bare minimum example
|
||||
│ ├── package.json
|
||||
│ ├── entities/schema.json
|
||||
│ └── scripts/functions.json
|
||||
│ └── scripts/index.json # Simple script examples
|
||||
├── complete-package/ # Full-featured example
|
||||
│ ├── package.json
|
||||
│ ├── entities/schema.json
|
||||
@@ -336,7 +336,7 @@ examples/
|
||||
1. `examples/README.md`
|
||||
2. `examples/minimal-package/package.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`
|
||||
6. `examples/complete-package/entities/schema.json`
|
||||
7. `examples/complete-package/types/index.json`
|
||||
|
||||
@@ -39,7 +39,7 @@ my-package/
|
||||
├── types/
|
||||
│ └── index.json # types_schema.json
|
||||
├── scripts/
|
||||
│ └── functions.json # script_schema.json
|
||||
│ └── [script-name].json # script_schema.json (e.g., automation.json)
|
||||
├── components/
|
||||
│ └── ui.json # components_schema.json
|
||||
├── validation/
|
||||
|
||||
@@ -18,7 +18,7 @@ The simplest valid MetaBuilder package with only required fields.
|
||||
**Files included:**
|
||||
- `package.json` - Basic metadata
|
||||
- `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
|
||||
|
||||
@@ -27,7 +27,7 @@ The simplest valid MetaBuilder package with only required fields.
|
||||
cd minimal-package
|
||||
../../schema_validator.sh package.json
|
||||
../../schema_validator.sh entities/schema.json
|
||||
../../schema_validator.sh scripts/functions.json
|
||||
../../schema_validator.sh scripts/index.json
|
||||
```
|
||||
|
||||
## Complete Package
|
||||
|
||||
@@ -352,7 +352,7 @@
|
||||
"package.json": "metadata",
|
||||
"entities/schema.json": "entities",
|
||||
"types/index.json": "types",
|
||||
"scripts/functions.json": "script",
|
||||
"scripts/*.json": "script",
|
||||
"components/ui.json": "components",
|
||||
"validation/validators.json": "validation",
|
||||
"styles/tokens.json": "styles",
|
||||
|
||||
@@ -21,7 +21,7 @@ packages/
|
||||
styles/
|
||||
index.json # Style definitions (schema: styles_schema.json)
|
||||
scripts/
|
||||
functions.json # Script definitions (schema: script_schema.json)
|
||||
[script-name].json # Script definitions (schema: script_schema.json, e.g., automation.json)
|
||||
types/
|
||||
index.json # Type definitions (schema: types_schema.json)
|
||||
```
|
||||
|
||||
@@ -39,7 +39,7 @@ Test packages with different user contexts:
|
||||
|
||||
## 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
|
||||
3. **PackageRenderer** (still the runtime entry) converts the component tree to React components
|
||||
4. **Component Registry** maps package-defined type names to React implementations
|
||||
@@ -52,10 +52,10 @@ Each JSON script package follows this structure:
|
||||
packages/
|
||||
└── {package_name}/
|
||||
└── seed/
|
||||
├── metadata.json # Package info
|
||||
├── components.json # Component definitions
|
||||
└── scripts/
|
||||
└── functions.json # JSON script definitions
|
||||
├── metadata.json # Package info
|
||||
├── components.json # Component definitions
|
||||
└── scripts/
|
||||
└── [script-name].json # JSON script definitions (e.g., automation.json)
|
||||
```
|
||||
|
||||
## JSON Script Output
|
||||
|
||||
Reference in New Issue
Block a user