edc-web-publishing-js
npm install edc-web-publishing-jsedc is a simple yet powerful tool for agile-like documentation
management.
Learn more at https://www.easydoccontents.com.
If you have an Angular, application you can use our edc help angular component available here :
https://github.com/tech-advantage/edc-popover-ng
No dependencies.
``bash`
$ npm install edc-web-publishing-js --save
with YARN, use:
`bash
$ yarn add edc-web-publishing-js
`
The edc help client has been made to be used with any web framework.
To use the help client, you first have to instantiate a new EdcClient.
Below is an exemple for an Angular Typescript project, where exported documentation is served on /doc url :
``
this.edcClient = new EdcClient('/doc/');
Note that you can use ES6 imports to import classes from edc-web-publishinh-js :
``
import { EdcClient, Documentation, Helper, InformationMap } from 'edc-web-publishing-js';
The edc help client expose several methods to get content :
* getInfo()
Returns a promise containing the content of the info.json file from the export.
* getContext()
Returns a promise containing the content of the context.json file from the export.
* getToc(): Promise\
Returns a promise containing a table of content as Toc (see Toc object) representing the content of the toc.json file from the export.
```
edcClient.getToc().then(toc: Toc => this.toc = toc);
* getHelper(mainKey, subKey): Promise\
Useful to get help content (see Helper object) for a particular key/subkey.
* getDocumentation(idDocumentation): Promise\
Useful to get help content (see Documentation object) for a particular documentation.
* getInformationMapFromDocId(): Promise\
Useful to retrieve information map for a particular documentation.
See InformationMap.
* getContent()
_Will be private in next release._
* getKey()
_Will be private in next release._
If you want more information, you can check our Angular help component library using this edc help client :
https://github.com/tech-advantage/edc-popover-ng
MIT TECH'advantage