paste.chapril.org-privatebin/doc
2018-11-16 18:04:09 +01:00
..
README.md generate code docs for private interfaces, too 2018-11-16 18:04:09 +01:00

Generating PHP documentation

In order to generate the documentation, you will need to install the following packages and its dependencies:

  • phpdoc
  • graphviz

Details about installing phpDocumentor can be found in that projects documentation.

Example for Debian and Ubuntu:

$ sudo apt install php-pear graphviz
$ sudo pear channel-discover pear.phpdoc.org
$ sudo pear install phpdoc/phpDocumentor

To generate the documentation, change into the main directory and run phpdoc:

$ cd PrivateBin
$ phpdoc --visibility public,protected,private -t doc/phpdoc -d lib/

Note: When used with PHP 7, the prerelease of phpDocumentator 2.9 needs to be manually installed by downloading it from GitHub and then manually moving it to e.g. /usr/local/bin and making it executable.

Generating JS documentation

In order to generate the documentation, you will need to install the following packages and its dependencies:

  • npm

Then you can use the node package manager to install the latest stable release of jsdoc globally:

$ npm install -g jsdoc

Example for Debian and Ubuntu, including steps to allow current user to install node modules globally:

$ sudo apt install npm
$ sudo mkdir /usr/local/lib/node_modules
$ sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
$ npm install -g jsdoc
$ ln -s /usr/bin/nodejs /usr/local/bin/node

To generate the documentation, change into the main directory and run phpdoc:

$ cd PrivateBin
$ jsdoc -p -d doc/jsdoc js/privatebin.js