new
engine-dmo new: Scaffold a type, a template, a component or a block. Every subcommand, argument and flag.
Scaffold a type, a template, a component or a block.
Every new command loads the whole configuration, so DATABASE_URL and every other variable without a default must be set, even though none connects to the database; a placeholder will do (see Commands and the environment).
| Command | What it does |
|---|---|
engine-dmo new block | A block template, and the schema stub that declares the block |
engine-dmo new component | A component: its contract, markup and co-located CSS |
engine-dmo new template | A template: a starter for a type, or a site’s copy of the shared one with --from-shared |
engine-dmo new type | A schema file for a custom type, and its template |
engine-dmo new block
A block template, and the schema stub that declares the block.
engine-dmo new block <key> [flags] | Argument | Required | Repeatable |
|---|---|---|
key | yes | no |
| Flag | Type | Default | Meaning |
|---|---|---|---|
--field | string | the blocks field that declares it | |
--type | string | the type whose blocks field declares the block |
--json prints the text output in the JSON envelope. Runs in a project.
engine-dmo new component
A component: its contract, markup and co-located CSS.
engine-dmo new component <name> | Argument | Required | Repeatable |
|---|---|---|
name | yes | no |
--json prints the text output in the JSON envelope. Runs in a project.
engine-dmo new template
A template: a starter for a type, or a site’s copy of the shared one with --from-shared.
engine-dmo new template <name> [flags] | Argument | Required | Repeatable |
|---|---|---|
name | yes | no |
| Flag | Type | Default | Meaning |
|---|---|---|---|
--from-shared | bool | copy the template the site resolves today into its own root, recording where it came from so engine-dmo check reports when the original changes |
--json prints the text output in the JSON envelope. Runs in a project.
new template <type>/entry.html writes a starter that prints the type’s fields. new template <type>/index.html writes only an empty body block naming the file, with no heading and no list: write the page’s h1, the list and its pager before you render it, or the accessibility checks fail on it. Context shows what an index page has to work with.
engine-dmo new type
A schema file for a custom type, and its template.
engine-dmo new type <key> | Argument | Required | Repeatable |
|---|---|---|
key | yes | no |
--json prints the text output in the JSON envelope. Runs in a project.