UNPKG

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