Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vscode-dev): Copy server assets as part of ng build #802

Merged
merged 1 commit into from
Aug 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,13 @@ npm-debug.log
yarn-error.log
testem.log
/typings
apps/electron/src/yarn.lock
apps/vscode/src/yarn.lock

# System Files
.DS_Store
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