scripts:
  artisan: kool exec app php artisan
  composer: kool exec app composer2
  mysql: kool exec -e MYSQL_PWD=$DB_PASSWORD database mysql -uroot
  node: kool docker kooldev/node:14 node
  node-setup:
  - kool run yarn install
  - kool run yarn dev
  reset:
  - kool run composer install
  - kool run artisan migrate:fresh --seed
  - kool run node-setup
  setup:
  - cp .env.example .env
  - kool start
  - kool run composer install
  - kool run artisan key:generate
  - kool run node-setup
  yarn: kool docker kooldev/node:14 yarn

  phpqa: kool docker jakzal/phpqa:php7.4-alpine

  # helpful to sync up service dependencies
  wait-services: kool exec app dockerize -wait tcp://database:3306 -wait tcp://cache:6379 -timeout 30s

  # quality assurance tools
  eslint: kool run yarn lint
  phan: kool run phpqa phan --color -p -l app -iy 5
  phpcpd: kool run phpqa phpcpd --fuzzy app
  phpmd: kool run phpqa phpmd app text phpmd/codesize.xml,phpmd/controversial.xml,phpmd/design.xml,phpmd/naming.xml,unusedcode,phpmd/cleancode.xml
  phpmnd: kool run phpqa phpmnd app --ignore-funcs=round,sleep,abort,strpad,number_format --exclude=tests --progress --extensions=default_parameter,-return,argument
  php-security-checker: kool run phpqa local-php-security-checker
  phpunit: kool exec app ./vendor/bin/phpunit
  start:chrome: kool docker -- --name="chromedriver" --network=$KOOL_GLOBAL_NETWORK -d --shm-size=256M fireworkweb/chromedriver:latest
  stop:chrome: docker stop chromedriver
  # dusk: kool run artisan dusk
  php-cs-fixer: kool run phpqa php-cs-fixer fix --diff --verbose
  php-cs-fixer-check: kool run php-cs-fixer --dry-run

  clear-all:
    - kool run artisan cache:clear
    - kool run artisan route:clear
    - kool run artisan view:clear
    - kool run artisan config:clear
