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/repo
will automatically generate a component entry, looking for ademo.html
page in the root of a repository. This version uses rawgit as a CDN. -
{displayName: String, docs: StringURL, demo: StringURL, test: StringURL}
will usedisplayName
for the name and ID in the component listing.docs
,demo
, andtest
should be CDN URLs to hosted versions of the rendered documentation,demo.html
, andtest.html
pages that can be loaded up in an iframe.
npm install
grunt serve [--port PORT=8125]
- Go to demo page
npm install
grunt test
You can run the test server and visit /test.html
to run the tests in the
browser, as well. Tests currently use mocha.