Skip to content
Thorsten Lorenz edited this page Apr 25, 2014 · 19 revisions

Table of Contents generated with DocToc

Namespace: Internal

Internal

Internal wicked functions

Source:

Methods

<static> cloneWiki(cb)

Clones the wiki project of the project in the current directory

Parameters:
Name Type Description
cb function

called back info about root dir, wiki dir and wiki repo url

Source:

<static> commitWiki(repo, cb)

Commits all changes that were applied to the wiki due to re-generating the API docs.

Parameters:
Name Type Description
repo Object

information about the wiki repo to be committed

Properties
Name Type Description
url String

github url to the repo

dir String

directory into which the repo is currenly checked out

cb function

called back when wiki is committed

Source:

<static> removeFiles(root, fileFilter, cb)

Removes the files matching the file filter in root and all subdirectories

Parameters:
Name Type Description
root Stirng

directory

fileFilter String | function

needs to return true to cause the file to be deleted

cb function

called back when all files were removed

Source:

<static> run(bin, args, cwd, cb) → {Object}

Spawns the given bin with the given args from the cwd or current working directory.

Parameters:
Name Type Argument Description
bin String

full path to the binary to run

args Array.<String>

the args to pass to the binary

cwd String <optional>

full path to the directory to run bin from, defaults to current directory

cb function

called back with err and/or program exit code

Source:
Returns:

the spawned binary which exposes stdout and stderr streams

Type
Object

<static> runJsdoc(projectroot, wikiroot, jsdocargs, cb)

Runs the jsdoc binary from the projectroot.

Note about jsdocargs

  • they shouldn't contain --destination option since destination is always inside wiki dir
  • if no --configure option is given, the default ./config/jsdocrc.json config is passed to jsdoc
Parameters:
Name Type Description
projectroot String

root of project whose jsdoc comments are converted to html

wikiroot String

in which the out folder with html files is created

jsdocargs Array.<String>

extra args for jsdoc supplied via -- --arg one --arg two ...

cb function

called back with jsdoc output dir

Source:

<static> sidebar(wikidir, apifiles, cb)

Updates _Sidebar.md to link to API wiki pages

Parameters:
Name Type Description
wikidir String

in which _Sidebar.md is stored

apifiles Array.<String>

API wiki pages

cb function

called back when _Sidebar.md was updated

Source:

<static> sidebarAddApi(sidebar, linkedfiles) → {String}

Updates the sidebar's links to API wiki pages

Parameters:
Name Type Description
sidebar String

current sidebar content

linkedfiles Array.<String>

API wiki pages

Source:
Returns:

sidebar with updated API links

Type
String

<static> wikify(wikidir, jsdocsdir, cb)

Generates wiki compatible *.API.md files from *.html jsdoc files

Parameters:
Name Type Description
wikidir String

where the generated *.API.md files will be stored

jsdocsdir String

where the *.html files where output by jsdoc

cb function

called back with the names of generated .API.md files

Source:

Generated with wicked.