How to "refresh" a widget's code while editing it

12692
23
Jump to solution
01-19-2015 08:40 PM
StephenLead
Regular Contributor III

I'm playing around with Adam Drackley's excellent Local Layer Widget and am making changes in the Widget.js file

What is the best way refresh a web app when changes have been made to a widget's JS code?

1) re-loading an existing web app (eg http://localhost:3344/webappbuilder/?id=17) doesn't show the updated code

2) creating a new app from the homepage (http://localhost:3344/webappbuilder) doesn't show the updated code (edit: it seems to work now)

3) closing and reopening the Node window (opened by the startup.bat file) sometimes shows the updated code (but not consistently)

Is there a method to load the latest version of a widget's code without restarting the Node server?

Thanks,

Steve

Message was edited by: Stephen Lead

0 Kudos
23 Replies
AndrewDavis5
New Contributor II

Thanks for the information.  It is helpful to me at this stage of my understanding.  coming up to speed on this has been hit and miss for me.  But this information is helping.  Andy

0 Kudos
HeinrichLangenhoven1
New Contributor

We just rename the folder,, then IIS force a fresh copy on the next load.... Not elegante, but works well...

0 Kudos
ZacWang
New Contributor II

I know this question has been a long time ago, but I just found a way to refresh the page automatically while any changes are made on the scripts.

Try the tool below and follow the instruction:

generator-esri-appbuilder-js

It can generate the template of a widget and you need to install "LiveReload" extension for Chrome.

Run "grunt" from command line.

The page will refresh when you make any changes on the project.

My description is a bit brief, following the link above I think you'll get it work.

0 Kudos
DavidWendelken
Occasional Contributor

Thanks!

0 Kudos