kickstarter/ember-documentary

Name: ember-documentary

Owner: Kickstarter

Description: An ambitious documentation generator for ember-cli apps.

Created: 2016-04-15 18:56:17.0

Updated: 2017-06-04 01:15:19.0

Pushed: 2016-04-20 16:59:48.0

Homepage: null

Size: 31

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Ember-documentary Build Status

Add JSDocs to your Ember components, then access those JSDocs elsewhere through an Ember component provided by ember-documentary. Great for living style guides.

Note: This addon is a work in progress, so the API may change a lot. To that end, this addon won't follow semver for versions 0.0.x. Once this addon hits version 0.1.0, this addon will follow semver from then on.

Installation
Usage

Add JSDocs to your Ember components like so:


rovides JSDoc information about a particular component.

ass a block to this component to define your own template and operate upon
he JSDoc information. The block should take one argument, which is the
nstance of this component. So, you can use this component like so:

``hbs
{#documentary-component 'documentary-component' as |meta|}}
 {{meta.signature}}
{/documentary-component}}
``

param {String} componentPath - Path to the component.

rt default Ember.Component.extend({

Then in an Ember template, you can access the JSDoc information. An example:

ocumentary-component 'documentary-component' as |meta|}}
meta.signature}}
ocumentary-component}}

meta is an instance of documentary-component, so you should be able to access every property in the component definition. Still, a rudimentary list of the API is below.

API

All the JSDoc tags (lines that start with @, like @param) have great documentation over at usejsdoc.

New JSDoc tag: @positionalParam

@positionalParam is not part of the official JSDoc spec. It is a custom tag I made for this library. It's implemented by preprocessing JSDoc comments and replacing any form of:

itionalParam {OptionalType} name

with:

am {OptionalType} __positional_param__name

The prefix __positional_param__ is stripped from the param name inside the documentary-component Ember.Component.

Tests
License

Copyright Kickstarter, PBC.

Released under an MIT License.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.