-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add -Svelte- and- Svelte with TypeScript Support- to Laravel Breeze #396
Conversation
Previously, the Inertia Breeze starter kit only supported React and Vue. This commit introduces support for Svelte, thus expanding the options available for users of the starter kit. Extensive testing has been conducted to ensure that Svelte integrates seamlessly with the existing codebase and works properly.
The Svelte stack within the Inertia console install script has been updated to handle TypeScript options. This includes an updated package.json script including the "tsc" command, copying over important .ts and .d.ts files, and handling the SSR option correctly.
Adjusted code formatting, specifically by replacing double quotes with single quotes and standardizing the use of whitespace. The changes are made in several JavaScript files in the project to maintain consistency in the codebase.
This commit mainly includes minor syntax updates for improved code readability and consistency. It ensures every object within the code has a trailing comma to maintain a consistent syntax throughout the code base. Additionally, it also provides a minor correction for better indentation.
The Svelte stack within the Inertia console install script has been updated to handle TypeScript options. This includes an updated package.json script including the "tsc" command, copying over important .ts and .d.ts files, and handling the SSR option correctly.
The style of string quotes has been updated to single quotes in the vite.config.ssr.js file for the inertia-svelt-ts stub. The changes ensure consistency and conform to the standard JavaScript style guide.
The style of string quotes has been updated to single quotes in the vite.config.ssr.js file for the inertia-svelt-ts stub. The changes ensure consistency and conform to the standard JavaScript style guide.
Finally someone is working on this, This will be very helpful for me along with other Svelte developers |
There is https://github.com/tapan288/breeze-svelte but it is outdated |
Any progress here? |
copy(__DIR__.'/../../stubs/inertia-common/jsconfig.json', base_path('jsconfig.json')); | ||
copy(__DIR__.'/../../stubs/inertia-svelte/resources/js/app.js', resource_path('js/app.js')); | ||
copy(__DIR__.'/../../stubs/inertia-svelte/resources/js/route.js', resource_path('js/route.js')); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is bootstrap.js missing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, the bootstrap file is created by laravel (composer create-project laravel/laravel
) isn't it ?
the React/vue builder also doesn't implement the copy of bootstrap.js either :
breeze/src/Console/InstallsInertiaStacks.php
Line 296 in 7d66aa4
copy(__DIR__.'/../../stubs/inertia-common/jsconfig.json', base_path('jsconfig.json')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true, I guess I have somehow deleted it, while trying out this pull request, because I manually copied the files.
Is there another way to install the breeze version from your branch directly? Something like composer require ... with the git branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes you can, check out the brach in your local, and rename the package name in composer to for example my-laravel/breeze
after that add this code to your project composer (the laravel project you want to test on) :
....
"repositories": [
{
"type": "path",
"url": "../path-to/breeze-branch"
}
],
"require": {
...
},
after that in your project you can run composer require "my-laravel/breeze @dev"
and you can continue with php artisan breeze:install
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation and the Svelte support!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're welcome of course 😉, there are a lot of people among the svelte community who needs breeze with svelte support, but unfortunately the PR is closed for the moment.
Let's keep this as a community maintained package for now. 👍 Helps our maintenance burden. |
Hi @taylorotwell , After reflecting on the major features and updates announced at the last Laracon, I believe it might be a good time to reconsider reopening this PR. The Svelte community has been growing rapidly, and many developers, including myself, would greatly appreciate having a Svelte Breeze starter kit as part of the official Laravel ecosystem. I understand the need to manage maintenance burdens, but with the growing demand for Svelte and TypeScript support, I believe this addition would be highly beneficial for Laravel developers. Thank you for considering this request, and I would be happy to assist in any way to make the integration as smooth as possible! Best regards, |
Description:
This pull request introduces Svelte and Svelte with TypeScript as new frontend options for Laravel Breeze. Previously, Laravel Breeze supported starter kits for Inertia with React and Vue. With this update, users can now choose Svelte for their Breeze starter applications.
Key Features:
php artisan breeze:install
command.npm run start
.npm run start-w-ssr
.Notes: