| 23 | |
| 24 | /** Resolves the architect options for the build target of the given project. */ |
| 25 | export function getProjectTargetOptions( |
| 26 | project: ProjectDefinition, |
| 27 | buildTarget: string, |
| 28 | ): Record<string, JsonValue | undefined> { |
| 29 | const options = project.targets?.get(buildTarget)?.options; |
| 30 | |
| 31 | if (!options) { |
| 32 | throw new SchematicsException( |
| 33 | `Cannot determine project target configuration for: ${buildTarget}.`, |
| 34 | ); |
| 35 | } |
| 36 | |
| 37 | return options; |
| 38 | } |
| 39 | |
| 40 | /** Gets all of the default CLI-provided build targets in a project. */ |
| 41 | export function getProjectBuildTargets(project: ProjectDefinition): TargetDefinition[] { |