Show:
Module: Autodocs

Methods

init ()

Defined in autodocs.js:61

Initialisation step for Autodocs

Used to check/ set any Autodocs environment variables

run ()

Defined in autodocs.js:16

Will determine which continuous integration environment and publishing environment to use, and then run those appropriately.

Currently, the supported ones are:

  • Continuous Integration (SELECT_CI):
    • travis
  • Publishing Environment (SELECT_PUBLISH):
    • github-pages

Runs various environment variables checks and sets defaults where appropriate. Then tests whether this particular build should trigger publishing the documentation, and if so fires the publish script

Properties

DOCUMENT_ASSETS

String (Environment Variable)

Defined in autodocs.js:238

Default: ''

DOCUMENT_BRANCH

String (Environment Variable)

Defined in autodocs.js:184

Default: 'master'

DOCUMENT_GENERATED_FOLDER

String (Environment Variable)

Defined in autodocs.js:198

Default: 'documentation'

DOCUMENT_JOB_INDEX

String (Environment Variable)

Defined in autodocs.js:191

Default: '1'

DOCUMENT_PUBLISH_FOLDER

String (Environment Variable)

Defined in autodocs.js:228

Joins DOCUMENT_PUBLISH_FOLDER_ROOT with DOCUMENT_PUBLISH_SUBFOLDER to get a concrete path to publish the documentation.

Default: '{{DOCUMENT_PUBLISH_FOLDER_ROOT}}/{{DOCUMENT_PUBLISH_SUBFOLDER}}'

DOCUMENT_PUBLISH_FOLDER_ROOT

String (Environment Variable)

Defined in autodocs.js:205

All documentation will be published under this root directory

This can be used for non-version-specific documentation

Default: 'api'

DOCUMENT_PUBLISH_SUBFOLDER

String (Environment Variable)

Defined in autodocs.js:216

The documentation will be published in this subdirectory of the root directory.

This can be used for version-specific documentation

Default: '{{MAJOR_VERSION}}.{{MINOR_VERSION}}'

FLAG_CLEAN_DOCUMENT

String (Environment Variable)

Defined in autodocs.js:137

Default: 'false'

FLAG_COPY_ASSETS

String (Environment Variable)

Defined in autodocs.js:123

Default: 'false'

FLAG_LATEST_PAGE

String (Environment Variable)

Defined in autodocs.js:152

By default, this will publish a latest pages, whose purpose is simply to redirect to the most recently publish API version

Assuming default values for other configurations, if the version of the project is currently 1.2.3,

  • http://USER.github.io/REPO/api/latest/
  • This URL will be published with an index.html file that redirects to:
  • http://USER.github.io/REPO/api/1.2/

Set to false to disable this behaviour.

Default: 'true'

FLAG_PUBLISH_ON_RELEASE

String (Environment Variable)

Defined in autodocs.js:130

Default: 'false'

FLAG_SKIP_PUSH

String (Environment Variable)

Defined in autodocs.js:171

Set to false to do all of the steps in publishing, except for the final step of pushing the changes to the git remote.

This is useful for testing and debugging purposes. Leaving this on in a CI environment would defeat the purpose of autodocs

Default: 'false'

FLAG_STRIP_TOKEN_OUTPUT

String (Environment Variable)

Defined in autodocs.js:144

Default: 'true'

GIT_EMAIL

String (Environment Variable)

Defined in autodocs.js:115

Default: 'autodocs-git-user@bguiz.com'

GIT_USER

String (Environment Variable)

Defined in autodocs.js:108

Default: 'autodocs Git User'

MAJOR_VERSION

String (Environment Variable)

Defined in autodocs.js:84

Default: The major version read in from package.json

MINOR_VERSION

String (Environment Variable)

Defined in autodocs.js:92

Default: The minor version read in from package.json

PATCH_VERSION

String (Environment Variable)

Defined in autodocs.js:100

Default: The patch version read in from package.json

PROJECT_DIR

String (Environment Variable)

Defined in autodocs.js:75

Default: The current working directory

SELECT_CI

String (Environment Variable)

Defined in autodocs.js:35

Default: 'travis'

SELECT_PUBLISH

String (Environment Variable)

Defined in autodocs.js:41

Default: 'github-pages'