diff --git a/.gitignore b/.gitignore
index 8e11af4..7163361 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,15 +10,17 @@ desktop.ini
.DS_Store
._*
-# Travis
-/build/phpdoc-*/
-/build/phpdoc-*.git/
-
# Composer
/composer.lock
/composer.phar
/vendor
+# phpDocumentor
+/_build/phpdoc/
+/_build/phpdoc.cache/
+/_build/phpdoc-*/
+/_build/phpdoc-*.git/
+
# User config
/config/config.php
diff --git a/phpcs.xml b/.phpcs.xml
similarity index 81%
rename from phpcs.xml
rename to .phpcs.xml
index 93b9ebb..77a35e5 100644
--- a/phpcs.xml
+++ b/.phpcs.xml
@@ -6,9 +6,14 @@
- ^build/
+ .
+
+
+ ^_build/
^vendor/
*.min.js
diff --git a/.phpdoc.xml b/.phpdoc.xml
new file mode 100644
index 0000000..c46b6da
--- /dev/null
+++ b/.phpdoc.xml
@@ -0,0 +1,32 @@
+
+
+
+
+ _build/phpdoc.cache
+
+
+ _build/phpdoc
+
+
+
+
+
+ .
+ index.php
+ index.php.dist
+
+
+ _build/*
+
+
+ config/*
+ config/config.php.template
+
+
+ plugins/*
+ plugins/DummyPlugin.php
+
+
+ vendor/*
+
+
diff --git a/.travis.yml b/.travis.yml
index aa0af02..90b27d2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,10 +17,10 @@ install:
- composer install
before_script:
- - export PATH="$TRAVIS_BUILD_DIR/build:$TRAVIS_BUILD_DIR/vendor/bin:$PATH"
+ - export PATH="$TRAVIS_BUILD_DIR/_build:$TRAVIS_BUILD_DIR/vendor/bin:$PATH"
script:
- - phpcs --standard=phpcs.xml "$TRAVIS_BUILD_DIR"
+ - phpcs --standard=.phpcs.xml "$TRAVIS_BUILD_DIR"
after_success:
- deploy-phpdoc-branch.sh
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b849472..ca6f0d8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -39,11 +39,11 @@ Pico uses the [PSR-2 Coding Standard](http://www.php-fig.org/psr/psr-2/) as defi
For historical reasons we don't use formal namespaces. Markdown files in the `content-sample` folder (the inline documentation) must follow a hard limit of 80 characters line length.
-It is recommended to check your code using [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) using the `PSR2` standard using the following command:
+It is recommended to check your code using [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) using Pico's `.phpcs.xml` standard. Use the following command:
- $ ./bin/phpcs --standard=PSR2 [file(s)]
+ $ ./vendor/bin/phpcs --standard=.phpcs.xml [file]...
-With this command you can specify a file or folder to limit which files it will check or omit that argument altogether, in which case the current directory is checked.
+With this command you can specify a file or folder to limit which files it will check or omit that argument altogether, in which case the current working directory is checked.
### Keep documentation in sync
diff --git a/build/deploy-phpdoc-branch.sh b/_build/deploy-phpdoc-branch.sh
similarity index 81%
rename from build/deploy-phpdoc-branch.sh
rename to _build/deploy-phpdoc-branch.sh
index f08063d..71e073a 100755
--- a/build/deploy-phpdoc-branch.sh
+++ b/_build/deploy-phpdoc-branch.sh
@@ -18,11 +18,13 @@ fi
PHPDOC_ID="${TRAVIS_BRANCH//\//_}"
generate-phpdoc.sh \
- "$TRAVIS_BUILD_DIR" "$TRAVIS_BUILD_DIR/build/phpdoc-$PHPDOC_ID" \
+ "$TRAVIS_BUILD_DIR/.phpdoc.xml" \
+ "$TRAVIS_BUILD_DIR/_build/phpdoc.cache" \
+ "$TRAVIS_BUILD_DIR/_build/phpdoc-$PHPDOC_ID" \
"Pico 1.0 API Documentation ($TRAVIS_BRANCH branch)"
[ $? -eq 0 ] || exit 1
deploy-phpdoc.sh \
- "$TRAVIS_REPO_SLUG" "heads/$TRAVIS_BRANCH @ $TRAVIS_COMMIT" "$TRAVIS_BUILD_DIR/build/phpdoc-$PHPDOC_ID" \
+ "$TRAVIS_REPO_SLUG" "heads/$TRAVIS_BRANCH @ $TRAVIS_COMMIT" "$TRAVIS_BUILD_DIR/_build/phpdoc-$PHPDOC_ID" \
"$TRAVIS_REPO_SLUG" "gh-pages" "phpDoc/$PHPDOC_ID"
[ $? -eq 0 ] || exit 1
diff --git a/build/deploy-phpdoc-release.sh b/_build/deploy-phpdoc-release.sh
similarity index 56%
rename from build/deploy-phpdoc-release.sh
rename to _build/deploy-phpdoc-release.sh
index 721f3a4..47b5795 100755
--- a/build/deploy-phpdoc-release.sh
+++ b/_build/deploy-phpdoc-release.sh
@@ -5,11 +5,13 @@
PHPDOC_ID="${TRAVIS_BRANCH//\//_}"
generate-phpdoc.sh \
- "$TRAVIS_BUILD_DIR" "$TRAVIS_BUILD_DIR/build/phpdoc-$PHPDOC_ID" \
+ "$TRAVIS_BUILD_DIR/.phpdoc.xml" \
+ "$TRAVIS_BUILD_DIR/_build/phpdoc.cache" \
+ "$TRAVIS_BUILD_DIR/_build/phpdoc-$PHPDOC_ID" \
"Pico 1.0 API Documentation ($TRAVIS_TAG)"
[ $? -eq 0 ] || exit 1
deploy-phpdoc.sh \
- "$TRAVIS_REPO_SLUG" "tags/$TRAVIS_TAG" "$TRAVIS_BUILD_DIR/build/phpdoc-$PHPDOC_ID" \
+ "$TRAVIS_REPO_SLUG" "tags/$TRAVIS_TAG" "$TRAVIS_BUILD_DIR/_build/phpdoc-$PHPDOC_ID" \
"$TRAVIS_REPO_SLUG" "gh-pages" "phpDoc/$PHPDOC_ID"
[ $? -eq 0 ] || exit 1
diff --git a/build/deploy-phpdoc.sh b/_build/deploy-phpdoc.sh
similarity index 100%
rename from build/deploy-phpdoc.sh
rename to _build/deploy-phpdoc.sh
diff --git a/build/generate-phpdoc.sh b/_build/generate-phpdoc.sh
similarity index 51%
rename from build/generate-phpdoc.sh
rename to _build/generate-phpdoc.sh
index c2fe334..961d323 100755
--- a/build/generate-phpdoc.sh
+++ b/_build/generate-phpdoc.sh
@@ -2,9 +2,10 @@
set -e
# parameters
-PHPDOC_SOURCE_DIR="$1"
-PHPDOC_TARGET_DIR="$2"
-PHPDOC_TITLE="$3"
+PHPDOC_CONFIG="$1"
+PHPDOC_CACHE_DIR="$3"
+PHPDOC_TARGET_DIR="$4"
+PHPDOC_TITLE="$5"
# print parameters
echo "Generating phpDocs..."
@@ -14,11 +15,9 @@ printf 'PHPDOC_TITLE="%s"\n' "$PHPDOC_TITLE"
echo
# generate phpdoc
-phpdoc -d "$PHPDOC_SOURCE_DIR" \
- -i "$PHPDOC_SOURCE_DIR/build/" \
- -i "$PHPDOC_SOURCE_DIR/vendor/" \
- -i "$PHPDOC_SOURCE_DIR/plugins/" -f "$PHPDOC_SOURCE_DIR/plugins/DummyPlugin.php" \
- -t "$PHPDOC_TARGET_DIR" \
+phpdoc --config "$PHPDOC_CONFIG" \
+ --cache-folder "$PHPDOC_CACHE_DIR" \
+ --target "$PHPDOC_TARGET_DIR" \
--title "$PHPDOC_TITLE"
echo