Coffeescript Docco an Installation Guide (Ubuntu or Mac OSX)

Docco is a documentation generator that has a beautiful interface for reading code. I’ve also recently been using it to document json structures that I’m modeling for a side project.

Configuring the generator should take only 3-5 mins.

Overview

First, you will need nodes/npm installed. If do not have these configured please go to nodejs.

Secondly, outside of the javascript modules installed via npm. Docco uses pygments a python library that handles the syntax-highlighting. Installing this library is easy and will be covered.

Onto the Installation

Use npm to install the followings modules Note the use of -g parameter to do a global install. These modules have bash commands associated with them and will work best as global installs.

sudo npm install -g coffee-script
sudo npm install -g docco

Configuring Pygments will require the installation of pip which is python’s version of npm.

sudo easy_install pip
sudo pip install pygments

That should complete the installation

Usage

To use docco go into your local folder containing .coffee files and use the bash command

docco *.coffee

This will create a local folder ./docs/ which will contain .html files for every .coffee file.

Posted on Tumblr - Fri Aug. 31st 2012, 10:43 AM

blog comments powered by Disqus