Development - melihovv/grammar_review_tool GitHub Wiki
In order to develop with Hot Module Replacement enabled
- check that
APP_ENV!=production - if your hmr server run not on this address
http://localhost:8080, you can specifyHMR_SERVERvariable in .env file npm run devphp artisan serve- go to http://localhost:8000.
In order to make commits
- take overview of commitizen and then do commits by typing
git cz
In order to validate commit message you need to setup git hooks
node node_modules/husky/bin/install.js(assumed you alreadyyarnornpm install)
Useful commands
composer run phpunitRuns phpunit tests.composer run phpcsChecks code according to phpcs-rules.composer run phpcbfAutomatically fix code according phpcs-rules.composer run phpmdChecks code according to phpmd-rulesphp artisan config:env-validatorChecks that necessary environment variables are provided in .env file.npm run unitRuns karma tests.npm run lintRuns eslint check according to config.npm run devRuns dev server with HMR enabled.npm run buildBuilds client code.
On every push to github repo styleci checks code style (config) and travis (config) runs
- phpunit tests
- phpcs check
- phpmd check
- karma tests
- eslint check
Useful routes
/logsLog viewer [local only]/api-testerAPI tester [local only]/routesList of routes [local only]
To run dusk tests:
- create .env.dusk.testing with the following content
APP_ENV=testing
APP_KEY=app_key
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost:8001
DB_CONNECTION="mysql"
DB_HOST="127.0.0.1"
DB_PORT=3306
DB_DATABASE=db_for_testing
DB_USERNAME=root
DB_PASSWORD=
CACHE_DRIVER="file"
SESSION_DRIVER="file"
QUEUE_DRIVER="sync"
MAIL_DRIVER=log
instead of mysql you may want to use sqlite
npm run buildphp artisan serve --env=dusk.testing --port=8001php artisan dusk --env=dusk.testing