Skip to content

Commit

Permalink
fix(electron): Use correct cwd for ng-new (#500)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmeku authored Feb 1, 2019
1 parent 5ba8f7b commit 3897b71
Show file tree
Hide file tree
Showing 9 changed files with 144 additions and 120 deletions.
11 changes: 10 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@
"outputPath": "dist/apps/vscode",
"main": "apps/vscode/src/main.ts",
"sourceMap": false,
"externalDependencies": ["vscode", "node-pty-prebuilt"],
"externalDependencies": [
"vscode",
"node-pty-prebuilt"
],
"tsConfig": "apps/vscode/tsconfig.app.json",
"assets": [
"apps/vscode/src/package.json",
Expand Down Expand Up @@ -193,6 +196,12 @@
"build": {
"builder": "@nrwl/builders:node-build",
"options": {
"externalDependencies": [
"electron",
"electron-updater",
"electron-updater",
"node-pty-prebuilt"
],
"outputPath": "dist/apps/electron",
"main": "apps/electron/src/main.ts",
"tsConfig": "apps/electron/tsconfig.app.json",
Expand Down
25 changes: 4 additions & 21 deletions apps/electron/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,11 @@
"main": "main.js",
"license": "MIT",
"dependencies": {
"@angular/cli": "7.2.3",
"@nrwl/angular-console-enterprise-electron": "0.0.40",
"@nrwl/schematics": "7.5.0",
"apollo-server-express": "2.3.2",
"dotenv": "6.2.0",
"electron-store": "2.0.0",
"opn": "^5.4.0",
"@angular/cli": "7.3.0",
"@nrwl/schematics": "7.5.1",
"@schematics/angular": "7.3.0",
"electron-updater": "3.1.2",
"@nestjs/common": "5.6.2",
"@nestjs/core": "5.6.2",
"@nestjs/graphql": "5.5.1",
"fix-path": "2.1.0",
"get-port": "4.0.0",
"graphql": "^14.0.2",
"node-pty-prebuilt": "0.7.6",
"progress-stream": "2.0.0",
"request": "2.88.0",
"resolve": "1.9.0",
"strip-json-comments": "2.0.1",
"universal-analytics": "0.4.20",
"uuid": "3.3.2",
"reflect-metadata": "^0.1.13"
"node-pty-prebuilt": "0.7.6"
},
"devDependencies": {
"electron": "2.0.14"
Expand Down
4 changes: 2 additions & 2 deletions apps/electron/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"sourceMap": false,
"declaration": false,
"moduleResolution": "node",
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"removeComments": true,
"stripInternal": true,
"target": "es2017",
"typeRoots": ["../node_modules/@types"],
"lib": ["dom", "es2017", "esnext.asynciterable"]
Expand Down
5 changes: 3 additions & 2 deletions apps/vscode/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@
]
},
"dependencies": {
"@angular/cli": "7.2.3",
"@nrwl/schematics": "7.5.0",
"@angular/cli": "7.3.0",
"@nrwl/schematics": "7.5.1",
"@schematics/angular": "7.3.0",
"node-pty-prebuilt": "0.7.6"
}
}
3 changes: 3 additions & 0 deletions apps/vscode/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc/apps/vscode",
"target": "es2017",
"removeComments": true,
"stripInternal": true,
"types": ["node"]
},
"exclude": ["**/*.spec.ts"],
Expand Down
3 changes: 0 additions & 3 deletions apps/vscode/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"target": "es6",
"removeComments": true,
"stripInternal": true,
"types": ["node"]
}
}
4 changes: 2 additions & 2 deletions libs/server/src/lib/resolvers/mutation.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ export class MutationResolver {
try {
return runCommand(
'new',
p,
__dirname,
'ng',
findClosestNg(__dirname),
[
'new',
name,
`--directory=${name}`,
`--directory=${p}/${name}`,
`--collection=${collection}`,
'--no-interactive',
...newCommand
Expand Down
15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
"copyright": "Copyright © 2018 Narwhal Technologies Inc",
"asar": false,
"files": [
"**/*",
"!**/node_modules/@schematics/**"
"**/*"
],
"extraResources": [
{
Expand Down Expand Up @@ -78,16 +77,16 @@
]
},
"dependencies": {
"@angular/cli": "7.2.3",
"@nrwl/schematics": "7.5.0",
"@angular/cli": "7.3.0",
"@schematics/angular": "7.3.0",
"@nrwl/schematics": "7.5.1",
"node-pty-prebuilt": "0.7.6"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.11.4",
"@angular-devkit/build-ng-packagr": "0.11.4",
"@angular/animations": "7.2.0",
"@angular/cdk": "7.2.1",
"@angular/cli": "7.2.3",
"@angular/common": "7.2.0",
"@angular/compiler-cli": "7.2.0",
"@angular/compiler": "7.2.0",
Expand All @@ -105,9 +104,9 @@
"@nestjs/graphql": "5.5.1",
"@nrwl/angular-console-enterprise-electron": "0.0.40",
"@nrwl/angular-console-enterprise-frontend": "0.0.40",
"@nrwl/builders": "7.4.0",
"@nrwl/nx": "7.4.0",
"@nrwl/schematics": "7.5.0",
"@nrwl/builders": "7.5.1",
"@nrwl/nx": "7.5.1",
"@nrwl/schematics": "7.5.1",
"@types/electron-store": "^1.3.0",
"@types/fontfaceobserver": "^0.0.6",
"@types/get-port": "^4.0.1",
Expand Down
Loading

0 comments on commit 3897b71

Please sign in to comment.