UNPKG

1.81 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 version_1 = require("../upgrade/version");
13const architect_command_1 = require("../models/architect-command");
14class 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 // Check Angular and TypeScript versions.
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}
38ServeCommand.aliases = ['s'];
39exports.default = ServeCommand;
40//# sourceMappingURL=/Users/hansl/Sources/hansl/angular-cli/commands/serve.js.map
\No newline at end of file