mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
Detect if no .env file exists and add it on composer commands.
This commit is contained in:
@ -53,11 +53,20 @@
|
|||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"prefer-stable": true,
|
"prefer-stable": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"initial-setup": [
|
||||||
|
"test -f .env || (cp .env.example .env; php artisan key:generate 2>/dev/null; exit 0)"
|
||||||
|
],
|
||||||
|
"pre-install-cmd": [
|
||||||
|
"@initial-setup"
|
||||||
|
],
|
||||||
|
"pre-update-cmd": [
|
||||||
|
"@initial-setup"
|
||||||
|
],
|
||||||
"post-root-package-install": [
|
"post-root-package-install": [
|
||||||
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
"@initial-setup"
|
||||||
],
|
],
|
||||||
"post-create-project-cmd": [
|
"post-create-project-cmd": [
|
||||||
"php artisan key:generate --ansi"
|
"@initial-setup"
|
||||||
],
|
],
|
||||||
"post-autoload-dump": [
|
"post-autoload-dump": [
|
||||||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||||
|
|||||||
Reference in New Issue
Block a user