generateProject

  • function
documentjs.configured.generateProject  

Generates a project's documentation from its documentjs.json

.configured.generateProject( project, parent, options)

Parameters

  1. project {Object}

    A projectConfig configured with at least:

    • path {String}

      The path of a project.

  2. parent {projectConfig}Optional

    An optional parent project that can be used to configure the behavior of this project.

  3. options {Object}Optional

Returns

{Promise}

A promise that resolves when the the project is documented.

Use

generateProject is used to generate an application based on a docConfig. The following reads from __dirname + "/documentjs.json" and generates a site:

var documentjs = require("documentjs");
documentjs.configured.generateProject({
  path: __dirname
}).then(function(){
  // documentjs produced
});

You can provide a docConfig if you don't want it read from the filesystem:

var documentjs = require("documentjs");
documentjs.configured.generateProject({
  path: __dirname,
  docConfig: {
       sites: {docs: {}}
  }
}).then(function(){
  // documentjs produced
});