documentation.js

A documentation generation system that's beautiful by default, flexible across formats and styles, and powerful enough to support JSDoc's advanced syntax.

YAML Configuration

documentation.js:

  • config-file:

    • Path to the documentation.js configuration file (documentation.yml).
    • If this field is omitted:
      • Docstand automatically searches for documentation.yml under your repository and uses it to build documentation.
  • input:

    • If this field is omitted:
      • If only one package.json is found under the repository, Docstand builds documentation at the directory where package.json exists.
      • In all other cases, input defaults to the repository root.
  • machine:

    • cpu:

      Amount of CPU. The default machine has 0.5 CPU with 1920 MiB RAM.

  • options:

    Below is the list of supported options:

    --theme, -t                specify a theme: this must be a valid theme module
    --project-name             project name. by default, inferred from
                               package.json
    --project-version          project version. by default, inferred from
                               package.json
    --project-description      project description. by default, inferred from
                               package.json
    --project-homepage         project homepage. by default, inferred from
                               package.json
    --shallow                  shallow mode turns off dependency resolution, only
                               processing the specified files (or the main script
                               specified in package.json)
                                                        [boolean] [default: false]
    --no-package, --np         dont find and use package.json for project-
                               configuration option defaults
                                                        [boolean] [default: false]
    --external                 a string / glob match pattern that defines which
                               external modules will be whitelisted and included
                               in the generated documentation.     [default: null]
    --require-extension, --re  additional extensions to include in require() and
                               import's search algorithm.For instance, adding .es5
                               would allow require("adder") to find "adder.es5"
    --parse-extension, --pe    additional extensions to parse as source code.
    --private, -p              generate documentation tagged as private
                                                        [boolean] [default: false]
    --access, -a               Include only comments with a given access level,
                               out of private, protected, public, undefined. By
                               default, public, protected, and undefined access
                               levels are included
                  [array] [choices: "public", "private", "protected", "undefined"]
    --github, -g               infer links to github in documentation    [boolean]
    --infer-private            Infer private access based on the name. This is a
                               regular expression that is used to match the name
                                                                          [string]
    --document-exported        Generate documentation for all exported bindings
                               and members even if there is no JSDoc for them
                                                        [boolean] [default: false]
    --sort-order               The order to sort the documentation
                                  [choices: "source", "alpha"] [default: "source"]
    --resolve                  Dependency resolution algorithm.
                                 [choices: "browser", "node"] [default: "browser"]
    

Resolving Dependencies

Docstand performs npm install under all the directories where package.json exists.

Examples

  • With documentation.js set to default:

    docstand:
      documentation.js: default
    
  • With custom machine:

    docstand:
      documentation.js:
        machine:
          cpu: 1.5 # 1.5 CPU, 5760 MiB RAM
    
  • With config-file option

    docstand:
      documentation.js:
        config-file: src/documentation.yml
    
  • With input option

    docstand:
      documentation.js:
        input:
          - lib/
          - src/app.js
    

    Note: In this case, Docstand builds documentation for src/app.js and the JavaScript files under lib.

  • With customized documentation.js

      docstand:
        documentation.js:
          options:
            --project-name: myapp
            --sort-order: alpha
            --access: [public, private]
            --github:
            --shallow:
    

results matching ""

    No results matching ""