-
Notifications
You must be signed in to change notification settings - Fork 44
Adding a standard plugin to CODAP V2
- In codap-data-interactives repo
master
branch:-
Add an object for the plugin you want to add into the data-interactives-map.json file. If the value for
”isStandard”
istrue
, the object will automatically be added to thepublished-plugins.json
file.
Example:
{
"title": "Transformers",
"description": "Transform datasets with a collection of powerful tools",
"title-string": "DG.plugin.Transformers.title",
"description-string": "DG.plugin.Transformers.description",
"width": 350,
"height": 450,
"icon": "/codap-transformers/transformers-icon-small.svg",
"path": "/codap-transformers/",
"visible": "false",
"isStandard": "true",
"categories": [
"Partners",
"Tools"
]
}
-
In the
bin/build
file, you need to add the plugin folder to the appropriate variable:- If adding a non-React plugin, add the containing folder to the
STATIC_PLUGIN_DIRS
variable. - If adding a React plugin, add the containing folder to the
BUILT_PLUGIN_DIRS
variable.
- If adding a non-React plugin, add the containing folder to the
-
Delete the
target
folder in the codap-data-interactives repo. -
In a terminal window, type
”bin/buid”
or”npm run std:build”
. This should re-build thetarget
folder. -
Once build is done, open the
target
folder and check to see if the plugin you added to the published-plugins.json appears in the folder.
-
- In the
codap
repo:- Add a similar object to the one you added in the
data-interactives-map.json
to the appropriate submenu array in theapps/dg/resources/json/hierarchical_plugins.json
object
- Add a similar object to the one you added in the
- To make the interactive appear in the codap-data-interactive-website. In the codap-data-interactives repo:
- Make sure you have added the plugin object into the data-interactive-map.json.
- Checkout `gh-pages` branch. Merge
master
branch togh-pages
branch - In a terminal window, type
”npm run build”
- Push changes to github.
- You may have to wait 15-30 minutes for the codap-data-interactives pages to update with your changes.