1 | "use strict";
|
2 | var __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 | };
|
10 | Object.defineProperty(exports, "__esModule", { value: true });
|
11 | const command_1 = require("../models/command");
|
12 | const version_1 = require("../upgrade/version");
|
13 | const architect_command_1 = require("../models/architect-command");
|
14 | class ServeCommand extends architect_command_1.ArchitectCommand {
|
15 | constructor() {
|
16 | super(...arguments);
|
17 | this.name = 'serve';
|
18 | this.target = 'serve';
|
19 | this.description = 'Builds and serves your app, rebuilding on file changes.';
|
20 | this.scope = command_1.CommandScope.inProject;
|
21 | this.options = [
|
22 | this.prodOption,
|
23 | this.configurationOption
|
24 | ];
|
25 | }
|
26 | validate(_options) {
|
27 |
|
28 | version_1.Version.assertCompatibleAngularVersion(this.project.root);
|
29 | version_1.Version.assertTypescriptVersion(this.project.root);
|
30 | return true;
|
31 | }
|
32 | run(options) {
|
33 | return __awaiter(this, void 0, void 0, function* () {
|
34 | return this.runArchitectTarget(options);
|
35 | });
|
36 | }
|
37 | }
|
38 | ServeCommand.aliases = ['s'];
|
39 | exports.default = ServeCommand;
|
40 |
|
\ | No newline at end of file |