Skip to content

Commit

Permalink
feat(vscode): Integrate with vscode-ui (#839)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmeku authored Oct 1, 2019
1 parent 9c9e75e commit 6c02464
Show file tree
Hide file tree
Showing 130 changed files with 2,814 additions and 6,609 deletions.
105 changes: 15 additions & 90 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"with": "apps/angular-console/src/environments/environment.vscode.ts"
}
],
"outputPath": "dist/apps/vscode/assets/public"
"outputPath": "dist/apps/vscode/assets/legacy"
},
"intellij": {
"fileReplacements": [
Expand Down Expand Up @@ -220,76 +220,6 @@
}
}
},
"feature-extensions": {
"root": "libs/feature-extensions",
"sourceRoot": "libs/feature-extensions/src",
"projectType": "library",
"architect": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["libs/feature-extensions/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "**/generated/**"]
}
}
}
},
"feature-generate": {
"root": "libs/feature-generate",
"sourceRoot": "libs/feature-generate/src",
"projectType": "library",
"architect": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["libs/feature-generate/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "**/generated/**"]
}
}
}
},
"feature-install-node-js": {
"root": "libs/feature-install-node-js",
"sourceRoot": "libs/feature-install-node-js/src",
"projectType": "library",
"architect": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["libs/feature-install-node-js/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "**/generated/**"]
}
}
}
},
"feature-run": {
"root": "libs/feature-run",
"sourceRoot": "libs/feature-run/src",
"projectType": "library",
"architect": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["libs/feature-run/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "**/generated/**"]
}
}
}
},
"feature-settings": {
"root": "libs/feature-settings",
"sourceRoot": "libs/feature-settings/src",
"projectType": "library",
"architect": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["libs/feature-settings/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "**/generated/**"]
}
}
}
},
"feature-workspaces": {
"root": "libs/feature-workspaces",
"sourceRoot": "libs/feature-workspaces/src",
Expand Down Expand Up @@ -413,43 +343,38 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/apps/vscode-ui",
"outputPath": "dist/apps/vscode/assets/public",
"index": "apps/vscode-ui/src/index.html",
"main": "apps/vscode-ui/src/main.ts",
"polyfills": "apps/vscode-ui/src/polyfills.ts",
"tsConfig": "apps/vscode-ui/tsconfig.app.json",
"assets": [
"apps/vscode-ui/src/favicon.ico",
"apps/vscode-ui/src/assets"
],
"styles": ["apps/vscode-ui/src/styles.scss"],
"scripts": [],
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"stylePreprocessorOptions": {
"includePaths": ["libs/vscode-ui/styles/src/lib"]
}
},
"es5BrowserSupport": false
},
"configurations": {
"production": {
"sourceMap": false,
"aot": true,
"optimization": true,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "apps/vscode-ui/src/environments/environment.ts",
"with": "apps/vscode-ui/src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
},
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
"replace": "apps/vscode-ui/src/styles.scss",
"with": "apps/vscode-ui/src/styles.prod.scss"
}
]
}
Expand Down
4 changes: 1 addition & 3 deletions apps/angular-console/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
>
<ui-contextual-action-bar></ui-contextual-action-bar>

<div class="outlet-container" [@routerTransition]="routerTransition | async">
<div class="outlet-container">
<router-outlet></router-outlet>
</div>

<ui-data-collection></ui-data-collection>
</div>
10 changes: 1 addition & 9 deletions apps/angular-console/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { FADE_IN } from '@angular-console/ui';
import { Settings } from '@angular-console/utils';
import { transition, trigger } from '@angular/animations';
import {
ChangeDetectionStrategy,
Component,
Expand All @@ -23,13 +21,7 @@ const TITLE_SEPARATOR = ' | ';
selector: 'angular-console-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
animations: [
trigger('routerTransition', [
transition('void => *', []),
transition(`* => *`, FADE_IN)
])
]
changeDetection: ChangeDetectionStrategy.OnPush
})
export class AppComponent implements OnInit, OnDestroy {
@ViewChild(RouterOutlet, { static: true }) routerOutlet: RouterOutlet;
Expand Down
16 changes: 3 additions & 13 deletions apps/angular-console/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
IS_INTELLIJ,
IS_VSCODE
} from '@angular-console/environment';
import { FeatureSettingsModule } from '@angular-console/feature-settings';
import {
FeatureWorkspacesModule,
workspaceRoutes
Expand Down Expand Up @@ -76,7 +75,7 @@ export function initApollo(
@NgModule({
declarations: [AppComponent],
imports: [
FeatureSettingsModule,
UiModule,
MatSidenavModule,
MatListModule,
MatIconModule,
Expand All @@ -88,22 +87,13 @@ export function initApollo(
HttpLinkModule,
HttpClientModule,
FeatureWorkspacesModule,
UiModule,
AngularConsoleEnterpriseFrontendModule.forRoot(),
RouterModule.forRoot(
[
{ path: '', pathMatch: 'full', redirectTo: '/workspaces' },
{
path: '',
children: workspaceRoutes,
canActivateChild: [IsNodeJsInstalledGuard]
},
{
path: 'install-nodejs',
loadChildren:
'@angular-console/feature-install-node-js#FeatureInstallNodeJsModule'
},
{ path: '**', redirectTo: '/workspaces' }
children: workspaceRoutes
}
],
{ paramsInheritanceStrategy: 'always' }
)
Expand Down
1 change: 0 additions & 1 deletion apps/vscode-ui/src/app/app.component.html

This file was deleted.

Empty file.
18 changes: 0 additions & 18 deletions apps/vscode-ui/src/app/app.component.spec.ts

This file was deleted.

10 changes: 0 additions & 10 deletions apps/vscode-ui/src/app/app.component.ts

This file was deleted.

12 changes: 7 additions & 5 deletions apps/vscode-ui/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { VscodeUiFeatureTaskExecutionFormModule } from '@angular-console/vscode-ui/feature-task-execution-form';
import {
VscodeUiFeatureTaskExecutionFormModule,
TaskExecutionFormComponent
} from '@angular-console/vscode-ui/feature-task-execution-form';
import { environment } from '../environments/environment';

@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, VscodeUiFeatureTaskExecutionFormModule],
providers: [],
bootstrap: [AppComponent]
providers: [...environment.providers],
bootstrap: [TaskExecutionFormComponent]
})
export class AppModule {}
3 changes: 2 additions & 1 deletion apps/vscode-ui/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export const environment = {
production: true
production: true,
providers: []
};
Loading

0 comments on commit 6c02464

Please sign in to comment.