diff --git a/README.md b/README.md index c472e1b..f1de103 100644 --- a/README.md +++ b/README.md @@ -183,7 +183,7 @@ $book->query('//chapters') }); ``` -You can map nodes easily too. +You can **map** nodes easily too. ```php $chaptersIds = $book->query('//chapter')->map(function ($i, $it) { diff --git a/support/coverage b/support/coverage index 07456ae..38e8eb5 100755 --- a/support/coverage +++ b/support/coverage @@ -23,22 +23,17 @@ if test $# -eq 1; then reporter=$1 fi -cd sandbox - -peridot_arguments="-c \"../support/peridot.php\" -r $reporter -g \"*.php\" \"../specs/\"" +peridot_arguments="-c ./support/peridot.php -r $reporter -g *.php ./specs/" if php -m | grep -i 'xdebug' > /dev/null; then echo ' info: using Xdebug.' - eval "peridot $peridot_arguments" + set -- $peridot_arguments + peridot "$@" elif chkcmd 'phpdbg'; then echo ' info: using phpdbg.' - echo - echo ' type: run' - echo ' quit' - echo - - eval "phpdbg -e \"$(which peridot)\" $peridot_arguments" + set -- $peridot_arguments + phpdbg -e -rr "$(which peridot)" "$@" else echo ' error: no profiling tool found.' exit 1 diff --git a/support/coveralls b/support/coveralls index b085533..4af222b 100755 --- a/support/coveralls +++ b/support/coveralls @@ -2,6 +2,7 @@ cd "$(dirname "$0")" . "./.common.sh" +cd .. if ! chkcmd 'curl'; then echo ' error: "curl" command not found.' @@ -14,11 +15,11 @@ if test $# -eq 1; then travis_job_id="$1" fi -coverage_data="$PWD/../../sandbox/code-coverage-report/code-coverage.php" +coverage_data="$PWD/sandbox/code-coverage-report/code-coverage.php" coverage_file="$(dirname "$coverage_data")/code-coverage.json" -./coverage php-code-coverage +./support/coverage php-code-coverage -php -f '../coveralls.php' "$coverage_data" "$travis_job_id" > "$coverage_file" +php -f './support/coveralls.php' "$coverage_data" "$travis_job_id" > "$coverage_file" curl -v -F json_file="@$coverage_file" "https://coveralls.io/api/v1/jobs" diff --git a/support/gendoc b/support/gendoc index 99d777b..5771fb1 100755 --- a/support/gendoc +++ b/support/gendoc @@ -23,10 +23,11 @@ genapi() { --source "source" \ --destination "$api_dir" \ --template-theme bootstrap \ - --template-config "sandbox/composer/apigen/theme-bootstrap/src/config.neon" \ + --template-config "./sandbox/composer/apigen/theme-bootstrap/src/config.neon" \ --title "FluidXML" \ --todo \ - --tree + --tree \ + --debug } doc_handler() @@ -39,6 +40,8 @@ doc_handler() done } -watch "source/" | dsstore_filter | doc_handler +genapi + +echo "Open $api_dir/index.html" -# chkcmd 'open' && open "$api_dir/index.html" +watch "source/" | dsstore_filter | doc_handler