This project tracks an index of components and renders their demo.html pages in iframes.
bower install --save bitovi/cc-component-index
In your javascript:
import "bower_components/cc-component-index/cc-component-index";In your template:
<cc-component-index components="bitovi-components/cc-hello-world
bitovi-components/cc-component-index">
</cc-component-index>This string or array will define which components appear in the component list. Components can be anywhere web-accessible and have two syntaxes they can be provided in:
-
username/repowill automatically generate a component entry, looking for ademo.htmlpage in the root of a repository. This version uses rawgit as a CDN. -
{displayName: String, docs: StringURL, demo: StringURL, test: StringURL}will usedisplayNamefor the name and ID in the component listing.docs,demo, andtestshould be CDN URLs to hosted versions of the rendered documentation,demo.html, andtest.htmlpages that can be loaded up in an iframe.
npm installgrunt serve [--port PORT=8125]- Go to demo page
npm installgrunt test
You can run the test server and visit /test.html to run the tests in the
browser, as well. Tests currently use mocha.