ECL theme for documentation.js
This is a custom theme for documentation.js:
it consists of underscore templates and a few assets: a highlight.js
theme and the base of ECL
Requirements:
- Node.js current (8.x)
yarn
or npm
wget
(downloading ECL releases)
Usage
CLI
Use the documentation.js CLI
Example:
$ npx documentation build **/_types/*.js --theme . -f html -o example/app
Where the --theme
flag should point to the module (index.js) of the theme.
Node API
See the html generation script for an example of the
formats.html
method as pointed out in the documentation pages.
Developing
Build the example
$ node example/scripts/docs-html.js
This will generate an example site in example/app
with the theme.
Fire a server and listen for changes
$ npx documentation serve --watch **/_types/*.js **/lib/helper.js **/*._ --theme .
In this case, you will still need to refresh the page with the example app manually.
Just code
$ yarn start
This is going to do create a working environment in dist/
folder.
- clean older working environment
- download ECL release (< 1MB) and add it to the theme
vendor
folder - bundle assets for the first time in specific folder
bundle
- documentation build taking templates and generating markup
Then, when the above are ready, watch tasks will start in parallel:
- documentation re-build
- assets' bundles rebuild
- hot
reload
server