UNPKG

1.57 kBJavaScriptView Raw
1"use strict";
2var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3 return new (P || (P = Promise))(function (resolve, reject) {
4 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6 function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
7 step((generator = generator.apply(thisArg, _arguments || [])).next());
8 });
9};
10Object.defineProperty(exports, "__esModule", { value: true });
11const command_1 = require("../models/command");
12const architect_command_1 = require("../models/architect-command");
13class RunCommand extends architect_command_1.ArchitectCommand {
14 constructor() {
15 super(...arguments);
16 this.name = 'run';
17 this.description = 'Runs Architect targets.';
18 this.scope = command_1.CommandScope.inProject;
19 this.arguments = ['target'];
20 this.options = [
21 this.configurationOption
22 ];
23 }
24 run(options) {
25 return __awaiter(this, void 0, void 0, function* () {
26 if (options.target) {
27 return this.runArchitectTarget(options);
28 }
29 else {
30 throw new Error('Invalid architect target.');
31 }
32 });
33 }
34}
35exports.default = RunCommand;
36//# sourceMappingURL=/Users/hansl/Sources/hansl/angular-cli/commands/run.js.map
\No newline at end of file