Skip to content
This repository has been archived by the owner on May 23, 2022. It is now read-only.

widget config.json does not grunt #88

Open
tyler-austin opened this issue Feb 16, 2017 · 4 comments
Open

widget config.json does not grunt #88

tyler-austin opened this issue Feb 16, 2017 · 4 comments

Comments

@tyler-austin
Copy link

current WAB dev edition saves a widgets config.json file in:

\server\apps#\configs\WidgetName\config_widgetname.json

so grunt will not update the config.json file in directory:

\server\apps#\widgets\WidgetName

You must copy the config_WidgetName.json then use it to replace the config.json in the widget development folder. then remember to update the app's "main" config.json to point to the correct location of the config_widgetname.json file:

      {
        "position": {
          "right": 110,
          "top": 10,
          "relativeTo": "map"
        },
        "placeholderIndex": 1,
        "id": "_12",
        "name": "WidgetName",
        "version": "0.0.0",
        "IsController": false,
        "uri": "widgets/WidgetName/Widget",
        "config": "widgets/WidgetName/config_widgetname.json",
        "icon": "widgets/WidgetName/images/icon_widgetname.png"
      }
@gavinr
Copy link
Contributor

gavinr commented Feb 16, 2017

@tyler-austin thank you for posting this issue.

Maybe we should solve this by having the grunt task automatically copy widgets/MyWidget/config.json to apps/Z/configs/MyWidget/config_MyWidget.json when it detects changes. Would that solve the problem here?

@tyler-austin
Copy link
Author

That would probably be the best approach. I should add that I experienced this when using the generator for 2D apps and widgets. I have yet to try 3D maps and widgets so I don't know if the behavior has has changed for both.

@gavinr gavinr added this to the v3? milestone Jan 30, 2018
@gavinr gavinr removed this from the v3.0 milestone Feb 26, 2018
@ryansutc
Copy link

Any reason why this was dropped from the milestone. Just tried the generator at WAB 2.8 and I am seeing the same thing.

@danielgis
Copy link

danielgis commented Aug 4, 2020

I think I'm late, but add some lines to the Gruntfile.js file, specifically inside the copy key
sample: { src: 'widgets/widgetname/config.json', dest: appDir + '/configs/widgetname/config_widgets_widgetname_Widget_id.json'}

If you have a better solution please let me know. 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants