YUIDoc API Documentation Plugin

If you're working on a JS app that's continuously growing and so is the developers involved then its probably wise to start considering a structured way to document your code!  And also, something that is easily searchable ... Hence why we chose YUIDoc.  This blog will talk about how easy it is to get setup and start generating amazingly cool JS documentation.

  1. Globally install YUIDoc plugin
    sudo npm -g install yuidocjs
  2. Add a configuration file (Optional)
    {
        "name": "My Cool App API",
        "description": "A really cool app.",
        "version": "1.0.0",
        "url": "http://coolapp.com",
        "options": {
            "outdir": "api"
        }
    }
    
  3. Generate docs
    cd /pathToJSRoot
    yuidoc .
  4. Access the documentation
    Note: We earlier set the output directory in step 1 to "api", otherwise it will default to "out".
    http://coolapp.com/pathToJSRoot/api/index.html