project-targets.js 968 B

12345678910111213141516171819202122232425
  1. "use strict";
  2. /**
  3. * @license
  4. * Copyright Google LLC All Rights Reserved.
  5. *
  6. * Use of this source code is governed by an MIT-style license that can be
  7. * found in the LICENSE file at https://angular.io/license
  8. */
  9. Object.defineProperty(exports, "__esModule", { value: true });
  10. /** Resolves the architect options for the build target of the given project. */
  11. function getProjectTargetOptions(project, buildTarget) {
  12. if (project.targets &&
  13. project.targets[buildTarget] &&
  14. project.targets[buildTarget].options) {
  15. return project.targets[buildTarget].options;
  16. }
  17. if (project.architect &&
  18. project.architect[buildTarget] &&
  19. project.architect[buildTarget].options) {
  20. return project.architect[buildTarget].options;
  21. }
  22. throw new Error(`Cannot determine project target configuration for: ${buildTarget}.`);
  23. }
  24. exports.getProjectTargetOptions = getProjectTargetOptions;
  25. //# sourceMappingURL=project-targets.js.map