javascripthtmlnode.jsangularjs

Automatically Deploy, Refresh (Clear Cache) and Reload your code for web developers


I am looking for something in-line with "ionic serve" which would detect any changes I make on the source code (Source Folders/WebContent) and :

  1. Automatically Deploy
  2. Automatically Refresh my Browser

So that I need not manually perform deployment -> Right Click my Browser -> Empty cache -> Reload my browser


Solution

  • I found the magic Node module which would save a lot of time and frustration for many developers:

    https://www.npmjs.com/package/reload

    Automatically refresh and reload your code in your browser when your code changes. No browser plugins required.

    Steps I used to set up:

    1. Install "reload" globally - "npm install reload -g" [if you don't have npm/node - search Google there are many tutorials]

    2. Place a package.json which starts server & also triggers "reload" to start watching changes on the dev folders [I will place the sample JSON by Monday]

    3. Now make some changes to the code file using any IDE (Notepad++/Atom/Eclipse etc) and save the file

    4. Simply open the browser and observe that the page which you had already open is automatically refreshing for you without any browser cache

    BTW, this was not that easy to find over search engines !! - Happy Coding