Skip to content

Converted global npm dependencies to use npx #328

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

Merged
merged 1 commit into from
Oct 28, 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
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ dist: xenial
dotnet: 3.0
before_script:
- export PATH="$PATH:/home/travis/.dotnet/tools"
- npm install electron-packager --global
script:
- ./buildAll.sh
3 changes: 1 addition & 2 deletions ElectronNET.CLI/Commands/AddCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ public Task<bool> ExecuteAsync()
ProcessHelper.CmdExecute("npm install", targetFilePath);

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

// search .csproj
Console.WriteLine($"Search your .csproj to add configure CopyToPublishDirectory to 'Never'");
Expand Down
4 changes: 2 additions & 2 deletions ElectronNET.CLI/Commands/BuildCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public Task<bool> ExecuteAsync()
ProcessHelper.CmdExecute("npm install", hosthookDir);

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

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

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

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

Expand Down
3 changes: 1 addition & 2 deletions ElectronNET.CLI/Commands/StartElectronCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@ public Task<bool> ExecuteAsync()
Console.WriteLine("Start npm install for typescript & hosthooks...");
ProcessHelper.CmdExecute("npm install", hosthookDir);

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

string path = Path.Combine(tempPath, "node_modules", ".bin");
Expand Down
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ The current Electron.NET CLI builds Windows/macOS/Linux binaries. Our API uses .
Also you should have installed:

* npm
* npm install -g typescript
* npm install -g electron-builder

# Community

Expand Down Expand Up @@ -104,12 +102,6 @@ To start the application make sure you have installed the "[ElectronNET.CLI](htt
dotnet tool install ElectronNET.CLI -g
```

* Make sure you have __node.js v8.6.0__ and on __macOS/Linux__ the electron-builder installed!

```
sudo npm install electron-builder --global
```

At the first time, you need an Electron.NET project initialization. Type the following command in your ASP.NET Core folder:

```
Expand Down
2 changes: 0 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
version: 1.0.{build}
image: Visual Studio 2019
build_script:
- cmd: npm install typescript --global
- cmd: npm install electron-builder --global
- cmd: buildAll.cmd
pull_requests:
do_not_increment_build_number: true
Expand Down