douglasduteil / angular-utility-belt

My non-lethal angular gadgets
http://douglasduteil.github.io/angular-utility-belt
MIT License
3 stars 1 forks source link

spec(README): API in the README ? #7

Open douglasduteil opened 10 years ago

douglasduteil commented 10 years ago

Will we put the full directive/service/provider/etc.. on the root README.md ?

douglasduteil commented 10 years ago

If yes how will we render the API of a directive/service/provider/etc.. in markdown ? Will it be like :

revolunet commented 10 years ago

what about a table ?

douglasduteil commented 10 years ago

K

So it will be like:


API

<ANY ng-model=""
       [name=""]
       [min=""]
       [max=""]>
Param Type Details
ngModel string Assignable angular expression to data-bind to.
name (optional) string Property name of the form under which the control is published.
min (optional) string Sets the min validation error key if the value entered is less than min
max (optional) string Sets the max validation error key if the value entered is greater than max.
... ... ...

$http

$http.get(url, [config]);

Shortcut method to perform GET request.

Param Type Details
ul string

Relative or absolute URL specifying the destination of the request

config
(optional)
Object

Object describing the request to be made and how it should be processed. The object has following properties:

  • method{string} – HTTP method (e.g. 'GET', 'POST', etc)
  • url{string} – Absolute or relative URL of the resource that is being requested.
  • ...
revolunet commented 10 years ago

yep je trouve ca tres bien !

mgcrea commented 10 years ago

Pareil, c'est top.

mgcrea commented 10 years ago

Initial support landed in 8e355a8ace9a7f384a2a21a827dae072bbaaa18c. Looks like multiline could be a problem.

Check the generated readme! Related task (run in sequence before the readme's one): https://github.com/douglasduteil/angular-utility-belt/blob/master/ng-factory/tasks/docs/ngdocs.js

douglasduteil commented 10 years ago

@mgcrea

Looks like multiline could be a problem.

You expected multiline ('\n' support) on the markdown result in the table ? Did you try mk multiline rendering before ? I mean the only way I made it working is by remplacing the '\n' with '<br>' no ?

Example :

Current mess :

Usage

Param Type Details
animation (optional) string Class to be added for animation purposes

Defaults value is 'am-fade'. prefixClass (optional) | string | Prefix prepended to class names and events Defaults value is 'alert'. placement (optional) | string | How to position the alert Defaults value is ''.

HTML table version (with <br> ) :

Usage

Param Type Details
animation (optional) string

Class to be added for animation purposes
Defaults value is `'am-fade'`.

prefixClass (optional) string

Prefix prepended to class names and events
Defaults value is `'alert'`.

placement (optional) string

How to position the alert
Defaults value is `''`.

mgcrea commented 10 years ago

@douglasduteil, yup let's go with <br>. Patched in 9e3bde50f0c508a09e05aadbad5b3b7db59e58af

douglasduteil commented 10 years ago

:+1: On peut considérer que le gulp readme est fini @mgcrea ?