| 397 | } |
| 398 | |
| 399 | function getComponentOptions(options: ApplicationOptions): Partial<ComponentOptions> { |
| 400 | const componentOptions: Partial<ComponentOptions> = !options.minimal |
| 401 | ? { |
| 402 | inlineStyle: options.inlineStyle, |
| 403 | inlineTemplate: options.inlineTemplate, |
| 404 | skipTests: options.skipTests, |
| 405 | style: options.style as unknown as ComponentStyle, |
| 406 | viewEncapsulation: options.viewEncapsulation, |
| 407 | } |
| 408 | : { |
| 409 | inlineStyle: options.inlineStyle ?? true, |
| 410 | inlineTemplate: options.inlineTemplate ?? true, |
| 411 | skipTests: true, |
| 412 | style: options.style as unknown as ComponentStyle, |
| 413 | viewEncapsulation: options.viewEncapsulation, |
| 414 | }; |
| 415 | |
| 416 | if (options.fileNameStyleGuide === '2016') { |
| 417 | componentOptions.type = 'component'; |
| 418 | componentOptions.addTypeToClassName = false; |
| 419 | } |
| 420 | |
| 421 | return componentOptions; |
| 422 | } |