scaffolding
scaffolding copied to clipboard
feat: Add option to scaffold web-app from a configuration file (that can be autogenerated)
Scaffolding Replay Feature
- As a user I would like to be able to re-run previously run commands without going through the same prompts.
Solutions
- Log each command and inputs run via the scaffolding cli into a logfile/ script file, which will generally be ignored from version control.
- The user can use this previously generated file to scaffold a new app i.e feeding it into the scaffolding cli as input
Technical Details
- Capture each command and inputs for each command / propmt
- Can be written into a yaml file
web-app:
name: "my-app"
description: "my description"
holo: true
disable-fast-track: false
setup-nix: true
package-manager: npm | pnpm | yarn | bun
dna:
app: "my_app"
name: "my_dna"
zome:
coordinator: <path>
integrity: <path>
dna: "my_app"
name: "my_zome"
entry-type:
crud: "crud"
# updatable: true
# deletable: true
fields:
- name: "name"
type: "String"
widget: "TextField"
linked_from:
link-from-original-to-each-update: true
reference-entry-hash: false
zome: "my_zome"
no-ui: false
link-type:
from-referenceable: "EntryA"
to-referenceable: "EntryB"
zome: "my_zome"
dna: "my_dna"
bidirectional: true
delete: true
no-ui: false
-
The config file should follow the schema above, the
exampleandtemplatecommands are left out since they are non project editing- This can change in the future, for now, let's get this to work with the vanilla workflow
-
Create structs for scaffoldable items and have a method to yamlfy the struct, then write it to a
scaffold-log.yamlfile -
Create a command to scaffold from a config yaml file.
The post you linked requires some sort of permission to read it, even signing up for Hackmd.io still throws error 403. Do you have an alternative link?
Yes it does @Zequez, will move over the content here, thanks for the heads up