When we built one of our new internal tools in Node, it was a no-brainer to use JSDoc syntax to document our code and the JSDoc documentation generator to turn that syntax into an easy-to-navigate HTML documentation website.

But words aren’t enough to explain some of the things we build — they’re best explained by flowcharts and class diagrams. We found no better library for our purposes than mermaid, a powerful tool that takes specialized markup and turns it into attractive charts without having to crack open your favorite diagramming software.

We had to put in a bit of elbow grease to get these two tools to work together in perfect harmony. But then we got to thinking — why not share the love? We rejiggered the code and wrapped mermaid into a JSDoc plugin which we call… drumroll… jsdoc-mermaid. And then we open sourced it!

It’s mind-blowingly simple to use and will add some serious pizazz to your already pizazzy JSDocs. Give it an npm install, add some mermaid syntax to your JSDocs, and take your documentation into the future!

Tagged with: