Skip to content

Commit 239d914

Browse files
Merge pull request #328 from jimbuck/netcore30
Converted global npm dependencies to use npx
2 parents 5af8e48 + b6fb1cb commit 239d914

File tree

6 files changed

+4
-17
lines changed

6 files changed

+4
-17
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ dist: xenial
44
dotnet: 3.0
55
before_script:
66
- export PATH="$PATH:/home/travis/.dotnet/tools"
7-
- npm install electron-packager --global
87
script:
98
- ./buildAll.sh

ElectronNET.CLI/Commands/AddCommand.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,8 @@ public Task<bool> ExecuteAsync()
7272
ProcessHelper.CmdExecute("npm install", targetFilePath);
7373

7474
// run typescript compiler
75-
string tscPath = Path.Combine(targetFilePath, "node_modules", ".bin");
7675
// ToDo: Not sure if this runs under linux/macos
77-
ProcessHelper.CmdExecute(@"tsc -p ../../", tscPath);
76+
ProcessHelper.CmdExecute(@"npx tsc -p ../../", targetFilePath);
7877

7978
// search .csproj
8079
Console.WriteLine($"Search your .csproj to add configure CopyToPublishDirectory to 'Never'");

ElectronNET.CLI/Commands/BuildCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public Task<bool> ExecuteAsync()
118118
ProcessHelper.CmdExecute("npm install", hosthookDir);
119119

120120
// ToDo: Not sure if this runs under linux/macos
121-
ProcessHelper.CmdExecute(@"tsc -p . --sourceMap false", hosthookDir);
121+
ProcessHelper.CmdExecute(@"npx tsc -p . --sourceMap false", hosthookDir);
122122
}
123123

124124
Console.WriteLine("Build Electron Desktop Application...");
@@ -153,7 +153,7 @@ public Task<bool> ExecuteAsync()
153153
ProcessHelper.CmdExecute($"node build-helper.js", tempPath);
154154

155155
Console.WriteLine($"Package Electron App for Platform {platformInfo.ElectronPackerPlatform}...");
156-
ProcessHelper.CmdExecute($"electron-builder . --config=./bin/electron-builder.json --{platformInfo.ElectronPackerPlatform} --{electronArch} -c.electronVersion=5.0.8 {electronParams}", tempPath);
156+
ProcessHelper.CmdExecute($"npx electron-builder . --config=./bin/electron-builder.json --{platformInfo.ElectronPackerPlatform} --{electronArch} -c.electronVersion=5.0.8 {electronParams}", tempPath);
157157

158158
Console.WriteLine("... done");
159159

ElectronNET.CLI/Commands/StartElectronCommand.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,8 @@ public Task<bool> ExecuteAsync()
7979
Console.WriteLine("Start npm install for typescript & hosthooks...");
8080
ProcessHelper.CmdExecute("npm install", hosthookDir);
8181

82-
string tscPath = Path.Combine(tempPath, "node_modules", ".bin");
8382
// ToDo: Not sure if this runs under linux/macos
84-
ProcessHelper.CmdExecute(@"tsc -p ../../ElectronHostHook", tscPath);
83+
ProcessHelper.CmdExecute(@"npx tsc -p ../../ElectronHostHook", tempPath);
8584
}
8685

8786
string path = Path.Combine(tempPath, "node_modules", ".bin");

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ The current Electron.NET CLI builds Windows/macOS/Linux binaries. Our API uses .
3131
Also you should have installed:
3232

3333
* npm
34-
* npm install -g typescript
35-
* npm install -g electron-builder
3634

3735
# Community
3836

@@ -109,12 +107,6 @@ To start the application make sure you have installed the "[ElectronNET.CLI](htt
109107
dotnet tool install ElectronNET.CLI -g
110108
```
111109

112-
* Make sure you have __node.js v8.6.0__ and on __macOS/Linux__ the electron-builder installed!
113-
114-
```
115-
sudo npm install electron-builder --global
116-
```
117-
118110
At the first time, you need an Electron.NET project initialization. Type the following command in your ASP.NET Core folder:
119111

120112
```

appveyor.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
version: 1.0.{build}
22
image: Visual Studio 2019
33
build_script:
4-
- cmd: npm install typescript --global
5-
- cmd: npm install electron-builder --global
64
- cmd: buildAll.cmd
75
pull_requests:
86
do_not_increment_build_number: true

0 commit comments

Comments
 (0)