Skip to content

Commit 189563d

Browse files
hanslalexeagle
authored andcommitted
refactor(@angular/cli): rename getset command to deprecated
1 parent 39b4cc0 commit 189563d

File tree

4 files changed

+26
-25
lines changed

4 files changed

+26
-25
lines changed

packages/angular/cli/commands.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"make-this-awesome": "./commands/easter-egg.json",
88
"eject": "./commands/eject.json",
99
"generate": "./commands/generate.json",
10-
"get": "./commands/getset.json",
11-
"set": "./commands/getset.json",
10+
"get": "./commands/deprecated.json",
11+
"set": "./commands/deprecated.json",
1212
"help": "./commands/help.json",
1313
"lint": "./commands/lint.json",
1414
"new": "./commands/new.json",
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* @license
3+
* Copyright Google Inc. All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
import { Command } from '../models/command';
9+
10+
export class DeprecatedCommand extends Command {
11+
public async run() {
12+
let message = 'The "${this.description.name}" command has been deprecated.';
13+
if (this.description.name == 'get' || this.description.name == 'set') {
14+
message = 'get/set have been deprecated in favor of the config command.';
15+
}
16+
17+
this.logger.error(message);
18+
19+
return 0;
20+
}
21+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"$schema": "http://json-schema.org/schema",
3-
"id": "GetSetCommandOptions",
3+
"$id": "ng-cli://commands/deprecated.json",
44
"description": "Deprecated in favor of config command.",
55
"$longDescription": "",
66

7-
"$impl": "./getset-impl#GetSetCommand",
7+
"$impl": "./deprecated-impl#DeprecatedCommand",
88
"$hidden": true,
99
"$type": "deprecated",
1010

1111
"type": "object"
12-
}
12+
}

packages/angular/cli/commands/getset-impl.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)