@spartacus/schematics
Version:
Spartacus schematics
154 lines (153 loc) • 4.87 kB
JSON
{
"$schema": "http://json-schema.org/schema",
"$id": "SpartacusSchematics",
"title": "Spartacus Schematics",
"type": "object",
"properties": {
"declareCmsModule": {
"type": "string",
"description": "Where to declare the generated CMS component. If omitted, a new module is generated.",
"default": ""
},
"cmsComponentData": {
"type": "boolean",
"description": "Inject the CmsComponentData.",
"default": true,
"alias": "cms"
},
"cmsComponentDataModel": {
"type": "string",
"description": "Specify the model class for the CmsComponentData.",
"alias": "cms-model"
},
"cmsComponentDataModelPath": {
"type": "string",
"description": "Specify the import path for the CmsComponentData. Default is '@spartacus/core'",
"alias": "cms-model-path",
"default": "@spartacus/core"
},
"routing": {
"type": "boolean",
"description": "When true, creates a routing module.",
"default": false
},
"routingScope": {
"enum": ["Child", "Root"],
"type": "string",
"description": "The scope for the new routing module.",
"default": "Child"
},
"route": {
"type": "string",
"description": "The route path for a lazy-loaded module. When supplied, creates a component in the new module, and adds the route to that component in the `Routes` array declared in the module provided in the `--module` option."
},
"commonModule": {
"type": "boolean",
"description": "When true, the new NgModule imports \"CommonModule\". ",
"default": true,
"visible": false
},
"module": {
"type": "string",
"description": "The declaring NgModule.",
"alias": "m"
},
"project": {
"type": "string",
"description": "The name of the project.",
"$default": {
"$source": "projectName"
}
},
"name": {
"type": "string",
"description": "The name of the component.",
"$default": {
"$source": "argv",
"index": 0
},
"x-prompt": "What name would you like to use for the component?"
},
"inlineStyle": {
"description": "When true, includes styles inline in the component.ts file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the component.ts file.",
"type": "boolean",
"default": false,
"alias": "s"
},
"inlineTemplate": {
"description": "When true, includes template inline in the component.ts file. By default, an external template file is created and referenced in the component.ts file.",
"type": "boolean",
"default": false,
"alias": "t"
},
"viewEncapsulation": {
"description": "The view encapsulation strategy to use in the new component.",
"enum": ["Emulated", "Native", "None", "ShadowDom"],
"type": "string",
"alias": "v"
},
"changeDetection": {
"description": "The change detection strategy to use in the new component.",
"enum": ["Default", "OnPush"],
"type": "string",
"default": "OnPush",
"alias": "c"
},
"prefix": {
"type": "string",
"description": "The prefix to apply to the generated component selector.",
"alias": "p",
"oneOf": [
{
"maxLength": 0
},
{
"minLength": 1,
"format": "html-selector"
}
]
},
"style": {
"description": "The file extension or preprocessor to use for style files.",
"type": "string",
"default": "scss",
"enum": ["css", "scss", "sass", "less", "styl"]
},
"type": {
"type": "string",
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\".",
"default": "Component"
},
"skipTests": {
"type": "boolean",
"description": "When true, does not create \"spec.ts\" test files for the new component.",
"default": false
},
"flat": {
"type": "boolean",
"description": "When true, creates the new files at the top level of the current project.",
"default": false
},
"selector": {
"type": "string",
"format": "html-selector",
"description": "The HTML selector to use for this component."
},
"skipSelector": {
"type": "boolean",
"default": false,
"description": "Specifies if the component should have a selector or not."
},
"export": {
"type": "boolean",
"default": true,
"description": "When true, the declaring NgModule exports this component."
},
"lintFix": {
"type": "boolean",
"default": false,
"description": "When true, applies lint fixes after generating the component."
}
},
"required": ["name"]
}