Phing is used for documenting linting of PHP files.
Grunt is used for documenting and linting of JavaScript files.
- Install Phing and PHP CodeSniffer
sudo pear channel-discover pear.phing.infosudo pear install phing/phing PHP_CodeSniffer-1.5.6 cakephp/CakePHP_CodeSniffer-0.1.30
- Install Node.js and its package manager, NPM
sudo apt-get install nodejs npmsudo ln -s /usr/bin/nodejs /usr/bin/node
- Install Grunt
sudo npm install -g grunt-clisudo rm -rf ~/.npm ~/tmp
- (Optional) To generate the documentation, you'll need to setup Java and phpDocumentor 2. Documentation generation is not required for patches.
echo "export JAVA_HOME=/usr/lib/jvm/default-java/jre" >> ~/.bashrcsource ~/.bashrcsudo apt-get install php5-xslsudo pear channel-discover pear.phpdoc.orgsudo pear install phpdoc/phpDocumentor
- Install Phing and PHP CodeSniffer
sudo pear channel-discover pear.phing.infosudo pear install phing/phing PHP_CodeSniffer-1.5.6 cakephp/CakePHP_CodeSniffer
- Install Node.js and its package manager, NPM
sudo apt-get install python-software-propertiessudo add-apt-repository ppa:chris-lea/node.jssudo apt-get update && sudo apt-get install nodejs
- Install Grunt
sudo npm install -g grunt-clisudo rm -rf ~/.npm ~/tmp
- (Optional) To generate the documentation, you'll need to setup Java and phpDocumentor 2. Documentation generation is not required for patches.
echo "export JAVA_HOME=/usr/lib/jvm/default-java/jre" >> ~/.bashrcsource ~/.bashrcsudo apt-get install php5-xslsudo pear channel-discover pear.phpdoc.orgsudo pear install phpdoc/phpDocumentor
Before proceeding, please confirm you have installed the dependencies above.
To run the build tasks:
cd /path/to/rms/utils/phing
phing build will run the linters. This is what Travis CI runs when a Pull Request is submitted.
phing doc will document all PHP and JavaScript files and place them in the doc folder.