Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including ok-doc-generator with all npm packages installed. Try it out:

var okDocGenerator = require("ok-doc-generator")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

ok-doc-generator v0.7.2

The documentation JSON generator

Docs View Generator

Effortless and live documentation generation.

This project is a satellite for the docsViewElm project.

How to run

npm i
./index.js -h

Why

Components libraries, pattern labs, etc. These are all tree like way to organise your code.

The main goal of this project is to generate a JSON-tree structure from your directories.

You only need to know a simple convention:

  • each directory of your documentation should contain a readme file. Even the simplest one just with front-matter
  • demos for components should go into demo directory

So, basically, the docs structure for your project might look like the following:

.gitignore
package.json
src
tests
docs
  - atoms
    - atom 1
      - demo
        - demo1.html
        - demo2.html
      - atom1.scss
      - readme.md
    - atom 2
      - demo
        - demo1.html
        - demo2.html
      - atom2.scss
      - readme.md
    - readme.md
  - molecules
    - ...
    - readme.md
  - components
    - ...
    - readme.md
  - readme.md
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free