@nhevia/simple-docs

0.6.5 • Public • Published

GitHub package.json version CircleCI Build Status Known Vulnerabilities PR GitHub Twitter Follow

simple-docs

A simple documentation tool.

Installation

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

Usage

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

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

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

/*sdoc
  This is the **main** component
*/

image

Options

  • -f <filename>, --file <filename>
    Set the output file name: sdoc -f docs-components | sdoc --file docs-components
  • -ni, --no-index
    Set the output file name. sdoc -ni | sdoc --no-index

Why?

Most major documentation libraries have tools that are beyond the current necessities for personal projects.

I needed a really simple tool to generate documentation for my scripts. Insert a comment block at the beggining of the file describing it and its usage and that's it.

Note that if you're working in a team with multiple people, there are better, more tested and reliable alternatives.

Contributing

Pull requests are more than welcome.

License

Copyright © 2020 Nicolas Hevia This project is MIT licensed

Package Sidebar

Install

npm i @nhevia/simple-docs

Weekly Downloads

0

Version

0.6.5

License

MIT

Unpacked Size

17.6 kB

Total Files

12

Last publish

Collaborators

  • nhevia