1- import { ArchitectCommand } from '../models/architect-command' ;
21import { Option , CommandScope } from '../models/command' ;
32import { Version } from '../upgrade/version' ;
4-
5- export interface Options {
6- project ?: string ;
7- configuration ?: string ;
8- prod : boolean ;
9- }
3+ import { ArchitectCommand , ArchitectCommandOptions } from '../models/architect-command' ;
104
115export default class BuildCommand extends ArchitectCommand {
126 public readonly name = 'build' ;
@@ -20,29 +14,14 @@ export default class BuildCommand extends ArchitectCommand {
2014 this . configurationOption
2115 ] ;
2216
23- public validate ( options : Options ) {
17+ public validate ( options : ArchitectCommandOptions ) {
2418 // Check Angular and TypeScript versions.
2519 Version . assertCompatibleAngularVersion ( this . project . root ) ;
2620 Version . assertTypescriptVersion ( this . project . root ) ;
2721 return super . validate ( options ) ;
2822 }
2923
30- public async run ( options : Options ) {
31- let configuration = options . configuration ;
32- if ( ! configuration && options . prod ) {
33- configuration = 'production' ;
34- }
35-
36- const overrides = { ...options } ;
37- delete overrides . project ;
38- delete overrides . configuration ;
39- delete overrides . prod ;
40-
41- return this . runArchitectTarget ( {
42- project : options . project ,
43- target : this . target ,
44- configuration,
45- overrides
46- } , options ) ;
24+ public async run ( options : ArchitectCommandOptions ) {
25+ return this . runArchitectTarget ( options ) ;
4726 }
4827}
0 commit comments