mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 03:23:57 +08:00
Angular 5.0+ has a full peer dependencies setup (with 6.0+ also having a configurable runtime error check) to ensure that an appropriate version of typescript is available for compilation. Angular CLI 8.0+ does not support Angular versions prior to these and therefore the warning is redundant. For the case where the developer wishes to use an unsupported TypeScript version, the developer would need to adjust two similar but differently name settings in two different configuration files.
28 lines
859 B
TypeScript
28 lines
859 B
TypeScript
/**
|
|
* @license
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
|
|
import { ArchitectCommand, ArchitectCommandOptions } from '../models/architect-command';
|
|
import { Arguments } from '../models/interface';
|
|
import { Version } from '../upgrade/version';
|
|
import { Schema as ServeCommandSchema } from './serve';
|
|
|
|
export class ServeCommand extends ArchitectCommand<ServeCommandSchema> {
|
|
public readonly target = 'serve';
|
|
|
|
public validate(_options: ArchitectCommandOptions & Arguments) {
|
|
// Check Angular versions.
|
|
Version.assertCompatibleAngularVersion(this.workspace.root);
|
|
|
|
return true;
|
|
}
|
|
|
|
public async run(options: ArchitectCommandOptions & Arguments) {
|
|
return this.runArchitectTarget(options);
|
|
}
|
|
}
|