Skip to content

Including A New Extension

Jaman Brundage edited this page May 10, 2016 · 10 revisions
  • Identify bower dependency name and version for the resource being added. (In this case it's "venn.js" and "0.2.8")

  • Open bower.json and add the file(s) to the “dependencies” section.

  • In config.js add an entry to the "paths" section which links directly to the JS file to be made eligible for inclusion in widgets (the index of which becomes the string to for requirejs to retrieve the file)

  • Determine which directory (within src/) is most appropriate for your new widget. (In this case the src/chart/ directory seems appropriate)

  • Paste a copy of the templates/SVGTemplate.js (or another any other widget file) file into the directory you’ve chosen in the previous step. (src/chart/ in this case)

  • Open the test/chartFactory.js file and add a node to the returned object for your new widget ( “chart” in the chartFactory.js file name corresponds to the directory chosen in steps 4 and 5)

  • Save your changes and open the demos/dermatology.html file in a web browser.

  • Your extension should now appear in the dermatology.html "Select A Widget" dropdown (within the section you've chosen in step #4)