dazinator / NetPack

.Net Core library, for runtime processing of static files such as typescript, js, css etc.
13 stars 2 forks source link

Browser Reload #32

Closed dazinator closed 6 years ago

dazinator commented 6 years ago

Provide a mechanism to automatically trigger page reloads when file changes are detected.

This will start very simple.

  1. It doesn't matter what file changes, any file change detected by netpack will cause the browser to refresh.
  2. In can be enabled contionally for the app, i.e If in development mode, then browser reload will be enabled. If not in development mode, then it need not be enabled. If its not enabled, then no client side script should be present on the rendered page (i.e websockets listeners, signalr listener etc). Therefore having some razor component that can be evaluated server side and included on the page only when enabled seems like the way to go.
dazinator commented 6 years ago

note to self: https://docs.microsoft.com/en-us/dotnet/standard/microservices-architecture/multi-container-microservice-net-applications/background-tasks-with-ihostedservice#implementing-ihostedservice-with-a-custom-hosted-service-class-deriving-from-the-backgroundservice-base-class