(tree: Tree, context: SchematicContext, features: FEATURES[], config: SetupConfig)
| 29 | |
| 30 | export const setupProject = |
| 31 | (tree: Tree, context: SchematicContext, features: FEATURES[], config: SetupConfig) => { |
| 32 | const { projectName } = getProject(config, tree); |
| 33 | |
| 34 | addIgnoreFiles(tree); |
| 35 | |
| 36 | if (features.length) { |
| 37 | return chain([ |
| 38 | addRootProvider(projectName, ({code, external}) => { |
| 39 | external('initializeApp', '@angular/fire/app'); |
| 40 | return code`${external('provideFirebaseApp', '@angular/fire/app')}(() => initializeApp(${ |
| 41 | config.sdkConfig ? `{ ${Object.entries(config.sdkConfig).map(([k, v]) => `${k}: ${JSON.stringify(v)}`).join(", ")} }` : "" |
| 42 | }))`; |
| 43 | }), |
| 44 | ...featureToRules(features, projectName, config.dataConnectConfig), |
| 45 | ]); |
| 46 | } |
| 47 | }; |
| 48 | |
| 49 | export const ngAddSetupProject = ( |
| 50 | options: DeployOptions |
no test coverage detected