2016-06-12 20:13:58 +00:00
|
|
|
.DEFAULT_GOAL := peppermint
|
|
|
|
|
2017-09-16 10:47:42 +00:00
|
|
|
.PHONY: setupApiDoc peppermint docs rest_docs module_api_docs
|
2016-06-12 20:13:58 +00:00
|
|
|
|
2016-06-13 05:41:29 +00:00
|
|
|
ApiDocPresent := $(shell sh -c apidoc --help 1\>/dev/null && rm -rf doc/)
|
2016-06-12 20:13:58 +00:00
|
|
|
|
|
|
|
peppermint:
|
|
|
|
@echo [peppermint/build] Rebuilding Pepperminty Wiki
|
|
|
|
php build.php
|
|
|
|
|
2017-09-16 10:47:42 +00:00
|
|
|
docs: rest_docs module_api_docs
|
|
|
|
|
|
|
|
rest_docs: setupApiDoc
|
2016-06-12 20:13:58 +00:00
|
|
|
@echo [peppermint/docs] Building docs
|
2018-02-14 22:24:02 +00:00
|
|
|
apidoc -o './docs/RestApi/' --config apidoc.json -f '.*\.php' -e 'index.php|ModuleApi'
|
2016-06-12 20:15:09 +00:00
|
|
|
rm -rf doc/
|
2016-06-12 20:13:58 +00:00
|
|
|
|
2017-09-16 10:47:42 +00:00
|
|
|
module_api_docs: phpdoc
|
|
|
|
@echo [peppermint/module api docs] Updating module api docs
|
|
|
|
php phpdoc run --directory . --target docs/ModuleApi --cache-folder docs/ModuleApiCache --ignore build/,php_error.php,Parsedown*,*.html --title "Pepperminty Wiki Module API" --visibility public
|
|
|
|
|
|
|
|
phpdoc:
|
|
|
|
curl -L https://phpdoc.org/phpDocumentor.phar -o phpdoc
|
|
|
|
|
2016-06-12 20:13:58 +00:00
|
|
|
setupApiDoc:
|
|
|
|
@echo [peppermint] Checking for apiDoc
|
|
|
|
ifndef ApiDocPresent
|
|
|
|
@echo [peppermint] Attempting to install ApiDoc, since it wasn't detected in your PATH
|
|
|
|
@echo [peppermint] Note that you may need to be root, and you'll need npm installed.
|
|
|
|
npm install apidoc --global
|
|
|
|
endif
|
|
|
|
@echo [peppermint] Check complete
|