Svelte init
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.
Feature
Added support for init svelte as a frontend framework
Description of Changes:
- Added selecting a template option while creating vite project (not in the cli but in code so any future templates can be easily addded without updating the command
npm create vite@latest --template templateOption) - Renamed
CreateViteReactProjecttoCreateViteProjectso this can be used for any other vite related templates that are added in the future - Added support for selecting Svelte in cli
- added svelte in tests
- fixed a small typo in the react documentation changed
whittowith
Checklist
- [x] I have self-reviewed the changes being requested
- [x] I have updated the documentation (check issue ticket #218)
this is my first go project/contribution ever just been watching content related to go never made any project as I am a front-end developer so let me know if the code can be improved or restuctured for any future contributions.
- fixed another error in showing
index.htmlin public folder fromreactproject directory structure in docs.
Going to look into this on the weekend. One thing though, we are potentially thinking of a creative way to consolidate these frontend frameworks, instead of making the --advanced flag options bloated
@Melkeydev yup I watched the video and read few comments about people wanting svelte and I thought it would be easy replacing just the vite template.
and being newbie at Golang i thought this would be a good starting point.
About the --advanced flag that is exactly what I thought when seeing the code I thought this was the beta features flag that maybe changed into the future.
- added svelte in tests and it is passing here
I noticed there isn't a test for react + tailwind when I was checking if svelte + tailwind test will run or not as it will the same as react
@Melkeydev fixed themake run command
@arafays We need to rethink the current CLI flow and implementation. However, one certainty is that a frontend flag that is independent and isolated from advanced options is the most probable solution. Implementing this requires many changes, and the code needs to be rewritten. Hopefully, this will be resolved in Q1 2025. You can leave the PR open or convert it to a draft. Once we have a clear picture and the new flag is implemented, you can update your PR.
@Ujstor converted to draft so that the project doesnt look abandoned :D I will keep a on lookout where I can help.
While adding svelte is nice to have, are there even enough standalone svelte users these days? For me it makes more sense to add sveltekit with the static adapter for SPAs.