Skip to content

Commit

Permalink
(chore) about support tools
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-orlando committed Nov 8, 2023
1 parent c917e1d commit 11c82b4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
15 changes: 5 additions & 10 deletions support/coverage
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions support/coveralls
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

cd "$(dirname "$0")"
. "./.common.sh"
cd ..

if ! chkcmd 'curl'; then
echo ' error: "curl" command not found.'
Expand All @@ -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"
11 changes: 7 additions & 4 deletions support/gendoc
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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

0 comments on commit 11c82b4

Please sign in to comment.