klipse-github-docs-generator

0.3.8 • Public • Published

Klipse GitHub Docs Generator · GitHub stars npm

This is a minimalistic tool to generate HTML pages with Klipse snippets from GitHub markdown.

Examples:

This tool is still rough around the edges. Feel free to contribute improvements!

npm version

Usage

First of all you need to have a GitHub markdown file with the documentation that includes the snippets that you want to klipsify. See here for an example. The essential part is having code snippets in the markdown that can be evaluated in a browser — like this:

1 + 2
// 3

Click here to evaluate the above in the browser.

Import statements do not work and you should have those marked in a different language. Like this:

import from 'some-awesome-library'

Install klipse-github-docs-generator

Install klipse-github-docs-generator as a dev dependency:

npm i --save-dev klipse-github-docs-generator

klipse-github-docs.config.js

To configure the generator the project root needs to have a file named klipse-github-docs.config.js, which must be a JavaScript file that must contain a single function that returns an array of configuration objects. See here for an example.

Generate docs

To generate docs you run the command:

npx klipse-github-docs-generator

You can also implement your own npm scripts to e.g. watch files to rebuild docs and reload browser to make editing feedback faster.

Readme

Keywords

Package Sidebar

Install

npm i klipse-github-docs-generator

Weekly Downloads

6

Version

0.3.8

License

MIT

Unpacked Size

34.6 kB

Total Files

12

Last publish

Collaborators

  • polytypic