diff --git a/.travis.yml b/.travis.yml index cdaa7eac..38db3cc1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/ElectronNET.CLI/Commands/AddCommand.cs b/ElectronNET.CLI/Commands/AddCommand.cs index 065850a7..8168d6dc 100644 --- a/ElectronNET.CLI/Commands/AddCommand.cs +++ b/ElectronNET.CLI/Commands/AddCommand.cs @@ -72,9 +72,8 @@ public Task 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'"); diff --git a/ElectronNET.CLI/Commands/BuildCommand.cs b/ElectronNET.CLI/Commands/BuildCommand.cs index a4d54167..ded988c6 100644 --- a/ElectronNET.CLI/Commands/BuildCommand.cs +++ b/ElectronNET.CLI/Commands/BuildCommand.cs @@ -118,7 +118,7 @@ public Task 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..."); @@ -153,7 +153,7 @@ public Task 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"); diff --git a/ElectronNET.CLI/Commands/StartElectronCommand.cs b/ElectronNET.CLI/Commands/StartElectronCommand.cs index 25835c2d..de271808 100644 --- a/ElectronNET.CLI/Commands/StartElectronCommand.cs +++ b/ElectronNET.CLI/Commands/StartElectronCommand.cs @@ -79,9 +79,8 @@ public Task 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"); diff --git a/README.md b/README.md index a905b07b..4fe3ee0b 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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: ``` diff --git a/appveyor.yml b/appveyor.yml index 33f8eb93..62d46748 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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