[PR #380] [CLOSED] Live Reload Implemented #1151

Open
opened 2026-01-29 16:57:51 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ElectronNET/Electron.NET/pull/380
Author: @syedadeel2
Created: 3/8/2020
Status: Closed

Base: masterHead: master


📝 Commits (3)

  • 32617c6 Live Reload Implemented
  • 394aea7 Console Output Callback Added
  • 300fcbf Auto Reload From Electron Enabled

📊 Changes

11 files changed (+310 additions, -20 deletions)

View changed files

📝 ElectronNET.API/Entities/BrowserWindowOptions.cs (+6 -0)
ElectronNET.CLI/Commands/DebugElectronCommand.cs (+177 -0)
📝 ElectronNET.CLI/ProcessHelper.cs (+86 -0)
📝 ElectronNET.CLI/Program.cs (+3 -0)
📝 ElectronNET.CLI/Properties/launchSettings.json (+1 -1)
📝 ElectronNET.Host/api/browserWindows.js (+11 -0)
📝 ElectronNET.Host/api/browserWindows.js.map (+1 -1)
📝 ElectronNET.Host/api/browserWindows.ts (+15 -0)
📝 ElectronNET.Host/main.js (+2 -17)
📝 ElectronNET.WebApp/ElectronNET.WebApp.csproj (+1 -1)
📝 ElectronNET.WebApp/Properties/launchSettings.json (+7 -0)

📄 Description

Hello,

I have enabled the Live Reload feature in ElectronNET CLI with new command "debug". This feature helps me a lot to increase my development when I need to test my methods with an electron window.

To view the video demo please click on this http://somup.com/cYej1tha0Q link

To enable the LiveReload you have to set the LiveReload variable to true see the below code in Startup.cs

public async void ElectronBootstrap()
 {
 var browserWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions {
                Width = 1500,
                Height = 940,
                Show = true,
                LiveReload = true,
                DarkTheme = true
 });
await browserWindow.WebContents.Session.ClearCacheAsync();
browserWindow.OnReadyToShow += () => browserWindow.Show();
browserWindow.SetTitle("LiveReload Demo");
}

If you like this feature to be apart of ElectronNET please approve and merge and I create an actual demo video for step by step how to enable live reload with ElectronNET.

Thank yous


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ElectronNET/Electron.NET/pull/380 **Author:** [@syedadeel2](https://github.com/syedadeel2) **Created:** 3/8/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (3) - [`32617c6`](https://github.com/ElectronNET/Electron.NET/commit/32617c664fe2fab1f00cf4bf61ef46c45c90cf77) Live Reload Implemented - [`394aea7`](https://github.com/ElectronNET/Electron.NET/commit/394aea7a9e154ea37662d1e9297c020f93855b48) Console Output Callback Added - [`300fcbf`](https://github.com/ElectronNET/Electron.NET/commit/300fcbf3fae15c300acf76995b7e7e24d768cc88) Auto Reload From Electron Enabled ### 📊 Changes **11 files changed** (+310 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `ElectronNET.API/Entities/BrowserWindowOptions.cs` (+6 -0) ➕ `ElectronNET.CLI/Commands/DebugElectronCommand.cs` (+177 -0) 📝 `ElectronNET.CLI/ProcessHelper.cs` (+86 -0) 📝 `ElectronNET.CLI/Program.cs` (+3 -0) 📝 `ElectronNET.CLI/Properties/launchSettings.json` (+1 -1) 📝 `ElectronNET.Host/api/browserWindows.js` (+11 -0) 📝 `ElectronNET.Host/api/browserWindows.js.map` (+1 -1) 📝 `ElectronNET.Host/api/browserWindows.ts` (+15 -0) 📝 `ElectronNET.Host/main.js` (+2 -17) 📝 `ElectronNET.WebApp/ElectronNET.WebApp.csproj` (+1 -1) 📝 `ElectronNET.WebApp/Properties/launchSettings.json` (+7 -0) </details> ### 📄 Description Hello, I have enabled the Live Reload feature in ElectronNET CLI with new command "debug". This feature helps me a lot to increase my development when I need to test my methods with an electron window. To view the video demo please click on this http://somup.com/cYej1tha0Q link To enable the LiveReload you have to set the LiveReload variable to true see the below code in Startup.cs ``` public async void ElectronBootstrap() { var browserWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Width = 1500, Height = 940, Show = true, LiveReload = true, DarkTheme = true }); await browserWindow.WebContents.Session.ClearCacheAsync(); browserWindow.OnReadyToShow += () => browserWindow.Show(); browserWindow.SetTitle("LiveReload Demo"); } ``` If you like this feature to be apart of ElectronNET please approve and merge and I create an actual demo video for step by step how to enable live reload with ElectronNET. Thank yous --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 16:57:51 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#1151