UNPKG

5.87 kBTypeScriptView Raw
1export interface Schema {
2 $schema?: string;
3 cli?: CliOptions;
4 /**
5 * Default project name used in commands.
6 */
7 defaultProject?: string;
8 /**
9 * Path where new projects will be created.
10 */
11 newProjectRoot?: string;
12 projects?: Projects;
13 schematics?: SchematicOptions;
14 version: number;
15}
16export interface CliOptions {
17 /**
18 * Share anonymous usage data with the Angular Team at Google.
19 */
20 analytics?: Analytics;
21 /**
22 * The default schematics collection to use.
23 */
24 defaultCollection?: string;
25 /**
26 * Specify which package manager tool to use.
27 */
28 packageManager?: PackageManager;
29 /**
30 * Control CLI specific console warnings
31 */
32 warnings?: Warnings;
33}
34/**
35 * Share anonymous usage data with the Angular Team at Google.
36 */
37export declare type Analytics = boolean | string;
38/**
39 * Specify which package manager tool to use.
40 */
41export declare enum PackageManager {
42 Cnpm = "cnpm",
43 Npm = "npm",
44 Pnpm = "pnpm",
45 Yarn = "yarn"
46}
47/**
48 * Control CLI specific console warnings
49 */
50export interface Warnings {
51 /**
52 * Show a warning when the TypeScript version is incompatible.
53 */
54 typescriptMismatch?: boolean;
55 /**
56 * Show a warning when the global version is newer than the local one.
57 */
58 versionMismatch?: boolean;
59}
60export interface Projects {
61}
62export interface SchematicOptions {
63 "@schematics/angular:class"?: SchematicsAngularClass;
64 "@schematics/angular:component"?: SchematicsAngularComponent;
65 "@schematics/angular:directive"?: SchematicsAngularDirective;
66 "@schematics/angular:module"?: SchematicsAngularModule;
67 "@schematics/angular:pipe"?: SchematicsAngularPipe;
68 "@schematics/angular:service"?: SchematicsAngularService;
69}
70export interface SchematicsAngularClass {
71 /**
72 * When true, does not create test files.
73 */
74 skipTests?: boolean;
75}
76export interface SchematicsAngularComponent {
77 /**
78 * Specifies the change detection strategy.
79 */
80 changeDetection?: ChangeDetection;
81 /**
82 * Specifies if the style will contain `:host { display: block; }`.
83 */
84 displayBlock?: boolean;
85 /**
86 * Specifies if the component is an entry component of declaring module.
87 */
88 entryComponent?: boolean;
89 /**
90 * Specifies if declaring module exports the component.
91 */
92 export?: boolean;
93 /**
94 * Flag to indicate if a directory is created.
95 */
96 flat?: boolean;
97 /**
98 * Specifies if the style will be in the ts file.
99 */
100 inlineStyle?: boolean;
101 /**
102 * Specifies if the template will be in the ts file.
103 */
104 inlineTemplate?: boolean;
105 /**
106 * Allows specification of the declaring module.
107 */
108 module?: string;
109 /**
110 * The prefix to apply to generated selectors.
111 */
112 prefix?: string;
113 /**
114 * The selector to use for the component.
115 */
116 selector?: string;
117 /**
118 * Flag to skip the module import.
119 */
120 skipImport?: boolean;
121 /**
122 * When true, does not create test files.
123 */
124 skipTests?: boolean;
125 /**
126 * The file extension or preprocessor to use for style files.
127 */
128 style?: Style;
129 /**
130 * Specifies the view encapsulation strategy.
131 */
132 viewEncapsulation?: ViewEncapsulation;
133}
134/**
135 * Specifies the change detection strategy.
136 */
137export declare enum ChangeDetection {
138 Default = "Default",
139 OnPush = "OnPush"
140}
141/**
142 * The file extension or preprocessor to use for style files.
143 */
144export declare enum Style {
145 Css = "css",
146 Less = "less",
147 Sass = "sass",
148 Scss = "scss",
149 Styl = "styl"
150}
151/**
152 * Specifies the view encapsulation strategy.
153 */
154export declare enum ViewEncapsulation {
155 Emulated = "Emulated",
156 Native = "Native",
157 None = "None",
158 ShadowDom = "ShadowDom"
159}
160export interface SchematicsAngularDirective {
161 /**
162 * Specifies if declaring module exports the directive.
163 */
164 export?: boolean;
165 /**
166 * Flag to indicate if a directory is created.
167 */
168 flat?: boolean;
169 /**
170 * Allows specification of the declaring module.
171 */
172 module?: string;
173 /**
174 * The prefix to apply to generated selectors.
175 */
176 prefix?: string;
177 /**
178 * The selector to use for the directive.
179 */
180 selector?: string;
181 /**
182 * Flag to skip the module import.
183 */
184 skipImport?: boolean;
185 /**
186 * When true, does not create test files.
187 */
188 skipTests?: boolean;
189}
190export interface SchematicsAngularModule {
191 /**
192 * Flag to control whether the CommonModule is imported.
193 */
194 commonModule?: boolean;
195 /**
196 * Flag to indicate if a directory is created.
197 */
198 flat?: boolean;
199 /**
200 * Allows specification of the declaring module.
201 */
202 module?: string;
203 /**
204 * Generates a routing module.
205 */
206 routing?: boolean;
207 /**
208 * The scope for the generated routing.
209 */
210 routingScope?: RoutingScope;
211}
212/**
213 * The scope for the generated routing.
214 */
215export declare enum RoutingScope {
216 Child = "Child",
217 Root = "Root"
218}
219export interface SchematicsAngularPipe {
220 /**
221 * Specifies if declaring module exports the pipe.
222 */
223 export?: boolean;
224 /**
225 * Flag to indicate if a directory is created.
226 */
227 flat?: boolean;
228 /**
229 * Allows specification of the declaring module.
230 */
231 module?: string;
232 /**
233 * Allows for skipping the module import.
234 */
235 skipImport?: boolean;
236 /**
237 * When true, does not create test files.
238 */
239 skipTests?: boolean;
240}
241export interface SchematicsAngularService {
242 /**
243 * Flag to indicate if a directory is created.
244 */
245 flat?: boolean;
246 /**
247 * When true, does not create test files.
248 */
249 skipTests?: boolean;
250}