AnsweredAssumed Answered

grunt and copies of widget config.json

Question asked by chet.egbert_CDFW on Aug 31, 2018
Latest reply on Aug 31, 2018 by chet.egbert_CDFW

I happened upon a good video here "Web AppBuilder for ArcGIS Advanced Development Tools and Techniques - YouTube " and managed to get Yeoman and grunt working to streamline my development workflow.  One issue I find is that my custom widget config.json winds up in two places under server/apps/n.  It is in the server/apps/n/widgets/x (with a name like config.json) and it is at server/apps/n/configs/x (with the name like config_widgets_x_Widget_n.js).

 

The trouble is that grunt copies from my repo only to server/apps/n/widgets/x.  So multiple copies of the custom widget config get out of sync. Referencing the config in javascript don't work while referencing in html by ${} will. 

 

I found my custom widget x listed in server/apps/n/config.json and changed its config property from the path server/apps/n/configs/x to the path server/apps/n/widgets/x.  Now all seams to work. I even renamed the duplicate config_widgets_x_Widget_n.js in server/apps/n/configs/x to xconfig_widgets_x_Widget_n.js to see if the app would miss it but it don't.

 

Why is a duplicate custom widget config kept in server/apps/n/configs/x?  Will the change i made to server/apps/n/config.json cause any unintended consequence?

Outcomes