UNPKG

1.06 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.ServeCommand = void 0;
4/**
5 * @license
6 * Copyright Google Inc. All Rights Reserved.
7 *
8 * Use of this source code is governed by an MIT-style license that can be
9 * found in the LICENSE file at https://angular.io/license
10 */
11const core_1 = require("@angular-devkit/core");
12const architect_command_1 = require("../models/architect-command");
13class ServeCommand extends architect_command_1.ArchitectCommand {
14 constructor() {
15 super(...arguments);
16 this.target = 'serve';
17 }
18 validate(_options) {
19 return true;
20 }
21 async run(options) {
22 return this.runArchitectTarget(options);
23 }
24 async reportAnalytics(paths, options, dimensions = [], metrics = []) {
25 if (options.buildEventLog !== undefined) {
26 dimensions[core_1.analytics.NgCliAnalyticsDimensions.NgBuildBuildEventLog] = true;
27 }
28 return super.reportAnalytics(paths, options, dimensions, metrics);
29 }
30}
31exports.ServeCommand = ServeCommand;