mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-09-22 06:54:44 +00:00
global npm outside of build commands
This commit is contained in:
@@ -105,20 +105,6 @@ namespace ElectronNET.CLI.Commands
|
||||
Console.WriteLine("Start npm install...");
|
||||
ProcessHelper.CmdExecute("npm install --production", tempPath);
|
||||
|
||||
Console.WriteLine("Start npm install electron-builder...");
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
// Works proper on Windows...
|
||||
ProcessHelper.CmdExecute("npm install electron-builder --global", tempPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ToDo: find another solution or document it proper
|
||||
// GH Issue https://github.com/electron-userland/electron-prebuilt/issues/48
|
||||
Console.WriteLine("Electron Builder - make sure you invoke 'sudo npm install electron-builder --global' & 'sudo npm install typescript --global' at " + tempPath + " manually. Sry.");
|
||||
}
|
||||
|
||||
Console.WriteLine("ElectronHostHook handling started...");
|
||||
|
||||
string electronhosthookDir = Path.Combine(Directory.GetCurrentDirectory(), "ElectronHostHook");
|
||||
@@ -128,13 +114,9 @@ namespace ElectronNET.CLI.Commands
|
||||
string hosthookDir = Path.Combine(tempPath, "ElectronHostHook");
|
||||
DirectoryCopy.Do(electronhosthookDir, hosthookDir, true, new List<string>() { "node_modules" });
|
||||
|
||||
Console.WriteLine("Start npm install for typescript & hosthooks...");
|
||||
ProcessHelper.CmdExecute("npm install -g typescript", hosthookDir);
|
||||
Console.WriteLine("Start npm install for hosthooks...");
|
||||
ProcessHelper.CmdExecute("npm install --production", hosthookDir);
|
||||
|
||||
// ToDo: Global TypeScript installation is needed for ElectronHostHook
|
||||
//string tscPath = Path.Combine(tempPath, "node_modules", ".bin");
|
||||
|
||||
// ToDo: Not sure if this runs under linux/macos
|
||||
ProcessHelper.CmdExecute(@"tsc -p . --sourceMap false", hosthookDir);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
echo "Start building Electron.NET dev stack..."
|
||||
|
||||
echo "Install NPM dependencies: Typescript and Bundler"
|
||||
npm install typescript --global
|
||||
npm install electron-builder --global
|
||||
|
||||
echo "Restore & Build API"
|
||||
cd ElectronNet.API
|
||||
dotnet restore
|
||||
|
||||
Reference in New Issue
Block a user