Skip to content

Commit

Permalink
fix(vscode-dev): Copy server assets as part of ng build
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmeku committed Aug 19, 2019
1 parent a02b5b9 commit 10d35b5
Show file tree
Hide file tree
Showing 24 changed files with 2,175 additions and 100 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/jobs/ci1.linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ steps:
- script: npx nps format.and.lint.check
displayName: 'format and lint check'

- script: npx nps build.ci.electron
- script: npx nps prepare.ci.electron
displayName: 'build electron'

- script: npx nx affected:test --base=origin/master --ci
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/jobs/ci2.linux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
steps:
- script: npx nps build.ci.electron
- script: npx nps prepare.ci.electron
displayName: build electron

- script: npx nps e2e.ci2.fixtures
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ Thumbs.db

#Environment
.env
**/generated/*
server/src/graphql-types.ts


# Intellij
Expand Down
7 changes: 6 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
"--extensionDevelopmentPath=${workspaceFolder}/dist/apps/vscode"
],
"trace": "false",
"outFiles": ["${workspaceFolder}/**/*"],
"internalConsoleOptions": "openOnFirstSessionStart",
"outFiles": [
"${workspaceFolder}/dist/apps/vscode",
"${workspaceFolder}/dist/apps/vscode/assets/public",
"${workspaceFolder}/node_modules"
],
"preLaunchTask": "npm: build-vs-code"
}
]
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ You can build the electron app by running `nps package.electronMac` or `nps pack

## Building VSCode Plugin

You can build the vscode extension and run it in development mode by opening up this repo in Visual Studio code and hitting the f5 function key. This will launch `nps build.dev.vscode` in the background and spawn an extension development host version of VSCode so that you can try out your code.
You can build the vscode extension and run it in development mode by opening up this repo in Visual Studio code and hitting the f5 function key. This will launch `nps prepare.dev.vscode` in the background and spawn an extension development host version of VSCode so that you can try out your code.

When you want to update the extension with a new set of changes, go back to the editor you launched the extension host from and click the refresh button (its green and looks like a browser refresh icon).

Expand Down
39 changes: 36 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,18 @@
"assets": [
"apps/vscode/src/package.json",
"apps/vscode/src/tree-view-icon.svg",
"apps/vscode/src/assets"
"apps/vscode/src/assets",
{
"glob": "schema.graphql",
"input": "node_modules/@nrwl/angular-console-enterprise-electron",
"output": "/assets/"
},
{ "glob": "README.md", "input": "./", "output": "/assets/" },
{
"glob": "**/*",
"input": "libs/server/src/assets",
"output": "/assets/"
}
],
"webpackConfig": "apps/electron/webpack.conf.js"
},
Expand Down Expand Up @@ -217,7 +228,18 @@
"apps/electron/src/.yarnrc",
"apps/electron/src/assets/new-workspace",
"apps/electron/src/assets/new-workspace.cmd",
"apps/electron/src/assets"
"apps/electron/src/assets",
{
"glob": "schema.graphql",
"input": "node_modules/@nrwl/angular-console-enterprise-electron",
"output": "/assets/"
},
{ "glob": "README.md", "input": "./", "output": "/assets/" },
{
"glob": "**/*",
"input": "libs/server/src/assets",
"output": "/assets/"
}
],
"webpackConfig": "apps/electron/webpack.conf.js"
},
Expand Down Expand Up @@ -261,7 +283,18 @@
"assets": [
"apps/intellij/src/package.json",
"apps/intellij/src/LICENSE",
"apps/intellij/src/assets"
"apps/intellij/src/assets",
{
"glob": "schema.graphql",
"input": "node_modules/@nrwl/angular-console-enterprise-electron",
"output": "/assets/"
},
{ "glob": "README.md", "input": "./", "output": "/assets/" },
{
"glob": "**/*",
"input": "libs/server/src/assets",
"output": "/assets/"
}
]
},
"configurations": {
Expand Down
1 change: 1 addition & 0 deletions libs/cypress/src/lib/generated/graphql.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type Maybe<T> = T | null;
1 change: 1 addition & 0 deletions libs/environment/src/lib/generated/graphql.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type Maybe<T> = T | null;
1 change: 1 addition & 0 deletions libs/feature-action-bar/src/lib/generated/graphql.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type Maybe<T> = T | null;
168 changes: 168 additions & 0 deletions libs/feature-extensions/src/lib/generated/graphql.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
export type Maybe<T> = T | null;

// ====================================================
// Documents
// ====================================================

export namespace NgAdd {
export type Variables = {
path: string;
name: string;
};

export type Mutation = {
__typename?: 'Mutation';

ngAdd: Maybe<NgAdd>;
};

export type NgAdd = {
__typename?: 'CommandStarted';

id: string;
};
}

export namespace WorkspaceAndExtensionsByName {
export type Variables = {
path: string;
name: string;
};

export type Query = {
__typename?: 'Query';

workspace: Workspace;

availableExtensions: AvailableExtensions[];
};

export type Workspace = {
__typename?: 'Workspace';

extensions: Extensions[];
};

export type Extensions = {
__typename?: 'Extension';

name: string;
};

export type AvailableExtensions = {
__typename?: 'Extension';

name: string;

description: string;

detailedDescription: Maybe<string>;
};
}

export namespace WorkspaceAndExtensions {
export type Variables = {
path: string;
};

export type Query = {
__typename?: 'Query';

workspace: Workspace;

availableExtensions: AvailableExtensions[];
};

export type Workspace = {
__typename?: 'Workspace';

extensions: Extensions[];
};

export type Extensions = {
__typename?: 'Extension';

name: string;
};

export type AvailableExtensions = {
__typename?: 'Extension';

name: string;

description: string;
};
}

// ====================================================
// START: Apollo Angular template
// ====================================================

import { Injectable } from '@angular/core';
import * as Apollo from 'apollo-angular';

import gql from 'graphql-tag';

// ====================================================
// Apollo Services
// ====================================================

@Injectable({
providedIn: 'root'
})
export class NgAddGQL extends Apollo.Mutation<NgAdd.Mutation, NgAdd.Variables> {
document: any = gql`
mutation NgAdd($path: String!, $name: String!) {
ngAdd(path: $path, name: $name) {
id
}
}
`;
}
@Injectable({
providedIn: 'root'
})
export class WorkspaceAndExtensionsByNameGQL extends Apollo.Query<
WorkspaceAndExtensionsByName.Query,
WorkspaceAndExtensionsByName.Variables
> {
document: any = gql`
query WorkspaceAndExtensionsByName($path: String!, $name: String!) {
workspace(path: $path) {
extensions {
name
}
}
availableExtensions(name: $name) {
name
description
detailedDescription
}
}
`;
}
@Injectable({
providedIn: 'root'
})
export class WorkspaceAndExtensionsGQL extends Apollo.Query<
WorkspaceAndExtensions.Query,
WorkspaceAndExtensions.Variables
> {
document: any = gql`
query WorkspaceAndExtensions($path: String!) {
workspace(path: $path) {
extensions {
name
}
}
availableExtensions {
name
description
}
}
`;
}

// ====================================================
// END: Apollo Angular template
// ====================================================
Loading

0 comments on commit 10d35b5

Please sign in to comment.