DEV Community

Nico Hevia
Nico Hevia

Posted on

sdoc - A simple documentation tool

I'm building a simple doc tool for inline commentaries, with markdown support. The project started as a need to have a simple documentation tool for documenting reusable components.


npm install @nhevia/simple-docs

or install as a development dependency:

npm install --save-dev @nhevia/simple-docs


  • Add sdoc as a package.json script:
"scripts": {
  "docs": "sdoc"
Enter fullscreen mode Exit fullscreen mode
  • Use a comment block at the start of any file with sdoc preffix:
This is the main component

// your code
Enter fullscreen mode Exit fullscreen mode
  • Run npm run docs. It will indentify documentation blocks in your project and generates an output file ( by default, on root folder):

Since the generated file is markdown, it is supported inside documentation blocks.

  This is the **main** component
Enter fullscreen mode Exit fullscreen mode


There is more info (examples, options, etc) in the repository's readme

This is my first public package and I got some help from a couple awesome people, but the project is totally open for PRs, enhancement, fixes, documentation, you call it.

I'm posting this hoping someone might find it useful or want to improve it a little bit. I don't intend this to be super serious because there are awesome documentation tools with lot of support, but it surely is a fun way to spend some time.

Any question just let me know, thanks for reading!

Top comments (0)