mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-15 18:13:38 +08:00
feat(@schematics/angular): recommend plugins that John Papa recommends
This list comes from https://marketplace.visualstudio.com/items?itemName=johnpapa.angular-essentials But we don't write a .prettier.json config file so we don't include the Prettier plugin yet
This commit is contained in:
parent
8b10768110
commit
3a68b8cf96
@ -18,7 +18,13 @@ const addExtensionRecommendations = updateJsonInTree(
|
||||
[
|
||||
'angular.ng-template',
|
||||
'nrwl.angular-console',
|
||||
'ms-vscode.vscode-typescript-tslint-plugin'].forEach(extension => {
|
||||
'ms-vscode.vscode-typescript-tslint-plugin',
|
||||
'Mikael.Angular-BeastCode',
|
||||
'EditorConfig.EditorConfig',
|
||||
'msjsdiag.debugger-for-chrome',
|
||||
'eg2.vscode-npm-script',
|
||||
'PKief.material-icon-theme',
|
||||
'natewallace.angular2-inline'].forEach(extension => {
|
||||
json.recommendations = json.recommendations || [];
|
||||
if (!json.recommendations.includes(extension)) {
|
||||
json.recommendations.push(extension);
|
||||
|
@ -9,6 +9,18 @@ import { Tree } from '@angular-devkit/schematics';
|
||||
import { SchematicTestRunner } from '@angular-devkit/schematics/testing';
|
||||
import { readJsonInTree, serializeJson, updateJsonInTree } from './ast-utils';
|
||||
|
||||
const recommendations = [
|
||||
'angular.ng-template',
|
||||
'nrwl.angular-console',
|
||||
'ms-vscode.vscode-typescript-tslint-plugin',
|
||||
'Mikael.Angular-BeastCode',
|
||||
'EditorConfig.EditorConfig',
|
||||
'msjsdiag.debugger-for-chrome',
|
||||
'eg2.vscode-npm-script',
|
||||
'PKief.material-icon-theme',
|
||||
'natewallace.angular2-inline',
|
||||
];
|
||||
|
||||
describe('Update 8.0.0', () => {
|
||||
let initialTree: Tree;
|
||||
let schematicRunner: SchematicTestRunner;
|
||||
@ -34,10 +46,7 @@ describe('Update 8.0.0', () => {
|
||||
.runSchematicAsync('migration-07', {}, initialTree)
|
||||
.toPromise();
|
||||
|
||||
expect(readJsonInTree(result, '.vscode/extensions.json')).toEqual({
|
||||
recommendations: [
|
||||
'angular.ng-template', 'nrwl.angular-console', 'ms-vscode.vscode-typescript-tslint-plugin'],
|
||||
});
|
||||
expect(readJsonInTree(result, '.vscode/extensions.json')).toEqual({recommendations});
|
||||
});
|
||||
|
||||
it('should add to existing vscode extension recommendations', async () => {
|
||||
@ -46,9 +55,7 @@ describe('Update 8.0.0', () => {
|
||||
updateJsonInTree('.vscode/extensions.json', () => ({
|
||||
recommendations: [
|
||||
'eamodio.gitlens',
|
||||
'angular.ng-template',
|
||||
'nrwl.angular-console',
|
||||
'ms-vscode.vscode-typescript-tslint-plugin'],
|
||||
...recommendations],
|
||||
})),
|
||||
initialTree,
|
||||
)
|
||||
@ -61,9 +68,7 @@ describe('Update 8.0.0', () => {
|
||||
expect(readJsonInTree(result, '.vscode/extensions.json')).toEqual({
|
||||
recommendations: [
|
||||
'eamodio.gitlens',
|
||||
'angular.ng-template',
|
||||
'nrwl.angular-console',
|
||||
'ms-vscode.vscode-typescript-tslint-plugin'],
|
||||
...recommendations],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -2,6 +2,12 @@
|
||||
"recommendations": [
|
||||
"angular.ng-template",
|
||||
"nrwl.angular-console",
|
||||
"ms-vscode.vscode-typescript-tslint-plugin"
|
||||
"ms-vscode.vscode-typescript-tslint-plugin",
|
||||
"Mikael.Angular-BeastCode",
|
||||
"EditorConfig.EditorConfig",
|
||||
"msjsdiag.debugger-for-chrome",
|
||||
"eg2.vscode-npm-script",
|
||||
"PKief.material-icon-theme",
|
||||
"natewallace.angular2-inline"
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user