CB-9745 Camera plugin docs should be generated from the source

Moved docs to jsdocs comments in the code, removed redundancy.
Moved Quirks and extra examples to errata sections of the docs TEMPLATE.md, linked the jsdoc comments to these sections.
Added dependencies to common plugin docs template and husky (precommit hook to regen the docs automatically).
Added gen-docs command to re-generate the docs.
Extended TOC manually [to include classes containing only one member](https://github.com/jsdoc2md/jsdoc-to-markdown/issues/34) (CameraPopoverHandle and CameraPopoverOptions).
Extended the docs via DMD template to include "Installation", "How to contribute" and "Docs are generated" warning.

github: close #129
This commit is contained in:
daserge
2015-10-05 13:48:19 +03:00
parent 454a6f518c
commit f20dfae735
9 changed files with 820 additions and 470 deletions
+26
View File
@@ -21,10 +21,36 @@
var exec = require('cordova/exec');
/**
* @namespace navigator
*/
/**
* A handle to an image picker popover.
*
* __Supported Platforms__
*
* ![](doc/img/android-fail.png) ![](doc/img/blackberry-fail.png) ![](doc/img/browser-fail.png) ![](doc/img/firefox-fail.png) ![](doc/img/fireos-fail.png) ![](doc/img/ios-success.png) ![](doc/img/windows-fail.png) ![](doc/img/wp8-fail.png) ![](doc/img/ubuntu-fail.png)
*
* @example
* var cameraPopoverHandle = navigator.camera.getPicture(onSuccess, onFail,
* {
* destinationType: Camera.DestinationType.FILE_URI,
* sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
* popoverOptions: new CameraPopoverOptions(300, 300, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY)
* });
*
* // Reposition the popover if the orientation changes.
* window.onorientationchange = function() {
* var cameraPopoverOptions = new CameraPopoverOptions(0, 0, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY);
* cameraPopoverHandle.setPosition(cameraPopoverOptions);
* }
* @module CameraPopoverHandle
*/
var CameraPopoverHandle = function() {
/** Set the position of the popover.
* @param {module:CameraPopoverOptions} popoverOptions
*/
this.setPosition = function(popoverOptions) {
var args = [ popoverOptions ];
exec(null, null, "Camera", "repositionPopover", args);