[12.x] Add install:vue Artisan command for Vue.js scaffolding setup #56670
+1,491
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a new
install:vue
Artisan command that installs and configures Vue.js scaffolding in a fresh Laravel application as discussed in: laravel/installer#434.The command handles the full setup process, including:
Inertia
andZiggy
via Composer.composer.json
with a newdev:ssr
script.npm install
to set up Node dependencies.The command is designed to run only on fresh installations. If Vue.js scaffolding is already configured, it will exit early with an error message to prevent overwriting an existing setup.
About other install commands
I am aware that we will also need
install:react
andinstall:livewire
commands. However, I created this PR first to gather feedback on the implementation approach before starting work on those two commands.About tests
I am not certain whether tests are required for this command. I noticed that the existing
install:api
command does not have dedicated tests, but if tests are desired, I will be happy to add them.