Monday, April 20, 2015

Grunt-JSDoc prevent output of source code

By default JSDoc will include your source code in the resulting documentation.  To prevent this from happening when using grunt-jsdoc you'll have to create an external configuration file:

gruntfile:
build: {
    options: {
        destination: '<%= path %>/doc',
        configure: 'conf.json'
    }
}

conf.json
{
  "source": {
    "include": "app/js/ascendon.service.js"
  },
  "templates": {
    "default": {
      "outputSourceFiles": false
    }
  }
}