Code Documentation with Jazzy

There are a number of ways to export your code documentation with user. For Swift programmers, there is Jazzy tool that automatically generates code documentation from your comments over code.

Jazzy is quite easy and very simple to use. It generates HTML documentation with just a single command in terminal.

You may refer to Jazzy’s GitHub Repository from following link

How to Install Jazzy ?

Jazzy is a ruby’s gem so you may install it simply by using following command in your Mac’s terminal

Although installation may take some time so you may check your whatsapp or search a pokemon near by.

Once installation is complete, simply go to your project’s directory by using “cd” command of terminal.

Just execute following command in terminal and jazzy will generate the documentation.

By default Jazzy exports documentation’s public functions. So you may need to declare functions as “public” in order to include them in documentation!!!

Don’t worry there is also a way to include private or internal function. Simply execute following command to include all functions of your code.

So above command generated the documentation. You may view your HTML documentation by viewing the “index.html” file in “docs” folder in your source code’s folder.

For lazy or busy people like me, can view following video that will show everything within 2 mins ( you may cook a maggi while watching this ).

Jazzy also allows customisation for exported HTML’s styles and Output location. Also you may include your Readme files. I would suggest you to visit the Jazzy’s GitHub repository to view full documentation.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.