diff --git a/angular.json b/angular.json
index a35cd09489..636a3e0b7a 100644
--- a/angular.json
+++ b/angular.json
@@ -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": [
@@ -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",
@@ -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"
}
]
}
diff --git a/apps/angular-console/src/app/app.component.html b/apps/angular-console/src/app/app.component.html
index cf51db8808..95082eb61f 100644
--- a/apps/angular-console/src/app/app.component.html
+++ b/apps/angular-console/src/app/app.component.html
@@ -4,9 +4,7 @@
>
-
diff --git a/apps/angular-console/src/app/app.component.ts b/apps/angular-console/src/app/app.component.ts
index 40282ad580..e4b0871afe 100644
--- a/apps/angular-console/src/app/app.component.ts
+++ b/apps/angular-console/src/app/app.component.ts
@@ -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,
@@ -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;
diff --git a/apps/angular-console/src/app/app.module.ts b/apps/angular-console/src/app/app.module.ts
index 98602f2d2c..d86cf4333a 100644
--- a/apps/angular-console/src/app/app.module.ts
+++ b/apps/angular-console/src/app/app.module.ts
@@ -4,7 +4,6 @@ import {
IS_INTELLIJ,
IS_VSCODE
} from '@angular-console/environment';
-import { FeatureSettingsModule } from '@angular-console/feature-settings';
import {
FeatureWorkspacesModule,
workspaceRoutes
@@ -76,7 +75,7 @@ export function initApollo(
@NgModule({
declarations: [AppComponent],
imports: [
- FeatureSettingsModule,
+ UiModule,
MatSidenavModule,
MatListModule,
MatIconModule,
@@ -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' }
)
diff --git a/apps/vscode-ui/src/app/app.component.html b/apps/vscode-ui/src/app/app.component.html
deleted file mode 100644
index 5c9f2a3c87..0000000000
--- a/apps/vscode-ui/src/app/app.component.html
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/apps/vscode-ui/src/app/app.component.scss b/apps/vscode-ui/src/app/app.component.scss
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/apps/vscode-ui/src/app/app.component.spec.ts b/apps/vscode-ui/src/app/app.component.spec.ts
deleted file mode 100644
index 8325b46d22..0000000000
--- a/apps/vscode-ui/src/app/app.component.spec.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { TestBed, async } from '@angular/core/testing';
-import { AppComponent } from './app.component';
-import { VscodeUiFeatureTaskExecutionFormModule } from '@angular-console/vscode-ui/feature-task-execution-form';
-
-describe('AppComponent', () => {
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- imports: [VscodeUiFeatureTaskExecutionFormModule],
- declarations: [AppComponent]
- }).compileComponents();
- }));
-
- it('should create the app', () => {
- const fixture = TestBed.createComponent(AppComponent);
- const app = fixture.debugElement.componentInstance;
- expect(app).toBeTruthy();
- });
-});
diff --git a/apps/vscode-ui/src/app/app.component.ts b/apps/vscode-ui/src/app/app.component.ts
deleted file mode 100644
index b2375304a2..0000000000
--- a/apps/vscode-ui/src/app/app.component.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { Component } from '@angular/core';
-
-@Component({
- selector: 'angular-console-root',
- templateUrl: './app.component.html',
- styleUrls: ['./app.component.scss']
-})
-export class AppComponent {
- title = 'vscode-ui';
-}
diff --git a/apps/vscode-ui/src/app/app.module.ts b/apps/vscode-ui/src/app/app.module.ts
index 9023cf4250..81bd2ad027 100644
--- a/apps/vscode-ui/src/app/app.module.ts
+++ b/apps/vscode-ui/src/app/app.module.ts
@@ -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 {}
diff --git a/apps/vscode-ui/src/environments/environment.prod.ts b/apps/vscode-ui/src/environments/environment.prod.ts
index 3612073bc3..644fd4a809 100644
--- a/apps/vscode-ui/src/environments/environment.prod.ts
+++ b/apps/vscode-ui/src/environments/environment.prod.ts
@@ -1,3 +1,4 @@
export const environment = {
- production: true
+ production: true,
+ providers: []
};
diff --git a/apps/vscode-ui/src/environments/environment.ts b/apps/vscode-ui/src/environments/environment.ts
index 7b4f817adb..f1f0a00d52 100644
--- a/apps/vscode-ui/src/environments/environment.ts
+++ b/apps/vscode-ui/src/environments/environment.ts
@@ -1,16 +1,270 @@
+import { TASK_EXECUTION_SCHEMA } from '@angular-console/vscode-ui/feature-task-execution-form';
+
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
-export const environment = {
- production: false
+export const MOCK_COMPONENT_ARCHITECT = {
+ name: 'Component',
+ project: 'Project',
+ builder: 'Builder',
+ description: 'Description',
+ options: { defaultValues: [] },
+ configurations: [],
+ schema: [
+ {
+ name: 'inlineStyle',
+ enum: null,
+ type: 'boolean',
+ description:
+ 'When true, includes styles inline in the component.ts file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the component.ts file.',
+ defaultValue: false,
+ required: false,
+ positional: false,
+ __typename: 'Schema',
+ important: false
+ },
+ {
+ name: 'inlineTemplate',
+ enum: null,
+ type: 'boolean',
+ description:
+ 'When true, includes template inline in the component.ts file. By default, an external template file is created and referenced in the component.ts file.',
+ defaultValue: false,
+ required: false,
+ positional: false,
+ __typename: 'Schema',
+ important: false
+ },
+ {
+ name: 'viewEncapsulation',
+ enum: ['Emulated', 'Native', 'None', 'ShadowDom'],
+ type: 'enum',
+ description:
+ 'The view encapsulation strategy to use in the new component.',
+ defaultValue: null,
+ required: false,
+ positional: false,
+ __typename: 'Schema',
+ important: false,
+ completionValues: {
+ _isScalar: false,
+ source: {
+ source: {
+ _isScalar: false,
+ source: {
+ _isScalar: false,
+ source: { _isScalar: false },
+ operator: { concurrent: 1 }
+ },
+ operator: {}
+ }
+ },
+ operator: {
+ connectable: {
+ source: {
+ _isScalar: false,
+ source: {
+ _isScalar: false,
+ source: { _isScalar: false },
+ operator: { concurrent: 1 }
+ },
+ operator: {}
+ }
+ }
+ }
+ }
+ },
+ {
+ name: 'changeDetection',
+ enum: ['Default', 'OnPush'],
+ type: 'string',
+ description: 'The change detection strategy to use in the new component.',
+ defaultValue: 'Default',
+ required: false,
+ positional: false,
+ __typename: 'Schema',
+ important: false,
+ completionValues: {
+ _isScalar: false,
+ source: {
+ source: {
+ _isScalar: false,
+ source: {
+ _isScalar: false,
+ source: { _isScalar: false },
+ operator: { concurrent: 1 }
+ },
+ operator: {}
+ }
+ },
+ operator: {
+ connectable: {
+ source: {
+ _isScalar: false,
+ source: {
+ _isScalar: false,
+ source: { _isScalar: false },
+ operator: { concurrent: 1 }
+ },
+ operator: {}
+ }
+ }
+ }
+ }
+ },
+ {
+ name: 'prefix',
+ enum: null,
+ type: 'string',
+ description: 'The prefix to apply to the generated component selector.',
+ defaultValue: null,
+ required: false,
+ positional: false,
+ __typename: 'Schema',
+ important: false
+ },
+ {
+ name: 'styleext',
+ enum: null,
+ type: 'string',
+ description: 'The file extension to use for style files.',
+ defaultValue: 'css',
+ required: false,
+ positional: false,
+ __typename: 'Schema',
+ important: false
+ },
+ {
+ name: 'style',
+ enum: ['css', 'scss', 'sass', 'less', 'styl'],
+ type: 'string',
+ description: 'The file extension or preprocessor to use for style files.',
+ defaultValue: 'css',
+ required: false,
+ positional: false,
+ __typename: 'Schema',
+ important: false,
+ completionValues: {
+ _isScalar: false,
+ source: {
+ source: {
+ _isScalar: false,
+ source: {
+ _isScalar: false,
+ source: { _isScalar: false },
+ operator: { concurrent: 1 }
+ },
+ operator: {}
+ }
+ },
+ operator: {
+ connectable: {
+ source: {
+ _isScalar: false,
+ source: {
+ _isScalar: false,
+ source: { _isScalar: false },
+ operator: { concurrent: 1 }
+ },
+ operator: {}
+ }
+ }
+ }
+ }
+ },
+ {
+ name: 'spec',
+ enum: null,
+ type: 'boolean',
+ description:
+ 'When true (the default), generates a "spec.ts" test file for the new component.',
+ defaultValue: true,
+ required: false,
+ positional: false,
+ __typename: 'Schema',
+ important: false
+ },
+ {
+ name: 'skipTests',
+ enum: null,
+ type: 'boolean',
+ description:
+ 'When true, does not create "spec.ts" test files for the new component.',
+ defaultValue: false,
+ required: false,
+ positional: false,
+ __typename: 'Schema',
+ important: false
+ },
+ {
+ name: 'flat',
+ enum: null,
+ type: 'boolean',
+ description:
+ 'When true, creates the new files at the top level of the current project.',
+ defaultValue: false,
+ required: false,
+ positional: false,
+ __typename: 'Schema',
+ important: false
+ },
+ {
+ name: 'skipImport',
+ enum: null,
+ type: 'boolean',
+ description:
+ 'When true, does not import this component into the owning NgModule.',
+ defaultValue: false,
+ required: false,
+ positional: false,
+ __typename: 'Schema',
+ important: false
+ },
+ {
+ name: 'selector',
+ enum: null,
+ type: 'string',
+ description: 'The HTML selector to use for this component.',
+ defaultValue: null,
+ required: false,
+ positional: false,
+ __typename: 'Schema',
+ important: false
+ },
+ {
+ name: 'entryComponent',
+ enum: null,
+ type: 'boolean',
+ description:
+ 'When true, the new component is the entry component of the declaring NgModule.',
+ defaultValue: false,
+ required: false,
+ positional: false,
+ __typename: 'Schema',
+ important: false
+ },
+ {
+ name: 'lintFix',
+ enum: null,
+ type: 'boolean',
+ description:
+ 'When true, applies lint fixes after generating the component.',
+ defaultValue: false,
+ required: false,
+ positional: false,
+ __typename: 'Schema',
+ important: false
+ }
+ ]
};
-/*
- * For easier debugging in development mode, you can import the following file
- * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
- *
- * This import should be commented out in production mode because it will have a negative impact
- * on performance if an error is thrown.
- */
-// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
+export const environment = {
+ production: false,
+ providers: [
+ {
+ provide: TASK_EXECUTION_SCHEMA,
+ useValue: MOCK_COMPONENT_ARCHITECT
+ }
+ ]
+};
diff --git a/apps/vscode-ui/src/index.html b/apps/vscode-ui/src/index.html
index 1fd4f04a4f..a597175d5b 100644
--- a/apps/vscode-ui/src/index.html
+++ b/apps/vscode-ui/src/index.html
@@ -7,8 +7,20 @@
+
+
-
+