diff --git a/README.md b/README.md index 84735b5..df7018c 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,95 @@ +[![Build status](https://travis-ci.org/PolymerElements/iron-component-page.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-component-page) +[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://beta.webcomponents.org/element/PolymerElements/iron-component-page) - +### Documenting your element -[![Build status](https://travis-ci.org/PolymerElements/iron-component-page.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-component-page) +`iron-component-page` is designed to make it easy to view documentation for +your custom element project. -_[Demo and API docs](https://elements.polymer-project.org/elements/iron-component-page)_ +1. Install the [Polymer CLI](https://github.com/Polymer/polymer-cli) with `npm + install -g polymer-cli` or `yarn global add polymer-cli`. This gives you a + command-line interface to Polymer Analyzer (among other things). +2. `cd` to your project directory. This can be a custom element, a full app, or + even a plain JavaScript library. Polymer Analyzer will discover all of the + interesting items recursively in your project directory. -## <iron-component-page> +3. Analyze your project with `polymer analyze > analysis.json`. This produces a + JSON descriptor file. By default `iron-component-page` will look for a file + called `analysis.json` (you can override this with the `descriptor-url` + property). + +4. Add `iron-component-page` as a dev dependency of your project: `bower + install iron-component-page --save-dev`. + +5. Create an HTML file to instantiate an `iron-component-page` element (e.g. + `index.html` or `docs.html`). Note that you may need to adjust your import + paths depending on your project layout: + +```html + + +
+ + + + + + +