Open otakupahp opened 4 months ago
Improved a bit, moved the install-build
before packages-install
to the end of scripts
"install-build": [
"@composer run-script packages-install",
"@format:php",
"@lint:php",
"@internationalize",
"@localize",
"@composer install --no-dev -o"
]
Final improvement adding scripts:
Added this to package.json
"build-production": "npm-run-all --sequential format:scripts format:styles lint:scripts lint:styles build",
And added this to composer.json
"npm run build-production"
so, when I run install-build
I have everything in on command
The full script:
"install-build": [
"@composer run-script packages-install",
"@format:php",
"@lint:php",
"@internationalize",
"@localize",
"@composer install --no-dev -o",
"npm run build-production"
]
This is pretty cool! I'll look into it again after my AFK 😄
Description
The composer.json file is great for dev, but needs extra scripts to make an easy build deployment.
Additional context
Usually I update the file to include additional scripts needed to deploy to production:
after "internationalize" scripts
And this
before "packages-install"
This way, when I need to push this, then I just run the
install-build
script