UNPKG

4.36 kBJSONView Raw
1{
2 "$schema": "http://json-schema.org/draft-07/schema",
3 "$id": "SchematicsAngularComponent",
4 "title": "Angular Component Options Schema",
5 "type": "object",
6 "description": "Creates a new, generic component definition in the given project.",
7 "additionalProperties": false,
8 "properties": {
9 "path": {
10 "type": "string",
11 "format": "path",
12 "$default": {
13 "$source": "workingDirectory"
14 },
15 "description": "The path at which to create the component file, relative to the current workspace. Default is a folder with the same name as the component in the project root.",
16 "visible": false
17 },
18 "project": {
19 "type": "string",
20 "description": "The name of the project.",
21 "$default": {
22 "$source": "projectName"
23 }
24 },
25 "name": {
26 "type": "string",
27 "description": "The name of the component.",
28 "$default": {
29 "$source": "argv",
30 "index": 0
31 },
32 "x-prompt": "What name would you like to use for the component?"
33 },
34 "displayBlock": {
35 "description": "Specifies if the style will contain `:host { display: block; }`.",
36 "type": "boolean",
37 "default": false,
38 "alias": "b"
39 },
40 "inlineStyle": {
41 "description": "Include 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.",
42 "type": "boolean",
43 "default": false,
44 "alias": "s",
45 "x-user-analytics": "ep.ng_inline_style"
46 },
47 "inlineTemplate": {
48 "description": "Include template inline in the component.ts file. By default, an external template file is created and referenced in the component.ts file.",
49 "type": "boolean",
50 "default": false,
51 "alias": "t",
52 "x-user-analytics": "ep.ng_inline_template"
53 },
54 "standalone": {
55 "description": "Whether the generated component is standalone.",
56 "type": "boolean",
57 "default": true,
58 "x-user-analytics": "ep.ng_standalone"
59 },
60 "viewEncapsulation": {
61 "description": "The view encapsulation strategy to use in the new component.",
62 "enum": ["Emulated", "None", "ShadowDom"],
63 "type": "string",
64 "alias": "v"
65 },
66 "changeDetection": {
67 "description": "The change detection strategy to use in the new component.",
68 "enum": ["Default", "OnPush"],
69 "type": "string",
70 "default": "Default",
71 "alias": "c"
72 },
73 "prefix": {
74 "type": "string",
75 "description": "The prefix to apply to the generated component selector.",
76 "alias": "p",
77 "oneOf": [
78 {
79 "maxLength": 0
80 },
81 {
82 "minLength": 1,
83 "format": "html-selector"
84 }
85 ]
86 },
87 "style": {
88 "description": "The file extension or preprocessor to use for style files, or 'none' to skip generating the style file.",
89 "type": "string",
90 "default": "css",
91 "enum": ["css", "scss", "sass", "less", "none"],
92 "x-user-analytics": "ep.ng_style"
93 },
94 "type": {
95 "type": "string",
96 "description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\".",
97 "default": "Component"
98 },
99 "skipTests": {
100 "type": "boolean",
101 "description": "Do not create \"spec.ts\" test files for the new component.",
102 "default": false
103 },
104 "flat": {
105 "type": "boolean",
106 "description": "Create the new files at the top level of the current project.",
107 "default": false
108 },
109 "skipImport": {
110 "type": "boolean",
111 "description": "Do not import this component into the owning NgModule.",
112 "default": false
113 },
114 "selector": {
115 "type": "string",
116 "format": "html-selector",
117 "description": "The HTML selector to use for this component."
118 },
119 "skipSelector": {
120 "type": "boolean",
121 "default": false,
122 "description": "Specifies if the component should have a selector or not."
123 },
124 "module": {
125 "type": "string",
126 "description": "The declaring NgModule.",
127 "alias": "m"
128 },
129 "export": {
130 "type": "boolean",
131 "default": false,
132 "description": "The declaring NgModule exports this component."
133 }
134 },
135 "required": ["name", "project"]
136}