Skip to content

Svelte init#343

Draft
arafays wants to merge 17 commits into
Melkeydev:mainfrom
arafays:svelte-init
Draft

Svelte init#343
arafays wants to merge 17 commits into
Melkeydev:mainfrom
arafays:svelte-init

Conversation

@arafays

@arafays arafays commented Nov 25, 2024

Copy link
Copy Markdown
Contributor

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 CreateViteReactProject to CreateViteProject so 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 whit to with

Checklist

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.

@arafays

arafays commented Nov 25, 2024

Copy link
Copy Markdown
Contributor Author
  • fixed another error in showing index.html in public folder from react project directory structure in docs.

Comment thread cmd/program/program.go

// set to false to not re-do in next step
p.AdvancedOptions[string(flags.Tailwind)] = false
} else {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • moved the copying of template file in else block of tailwind as currently the app file was written once and then again it was overwritten if the tailwind one needed to be copied so now it is only written once.

@Melkeydev

Copy link
Copy Markdown
Owner

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

@arafays

arafays commented Nov 28, 2024

Copy link
Copy Markdown
Contributor Author

@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.

@arafays

arafays commented Dec 2, 2024

Copy link
Copy Markdown
Contributor Author
  • 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

@arafays

arafays commented Dec 3, 2024

Copy link
Copy Markdown
Contributor Author

@Melkeydev fixed themake run command

@Ujstor

Ujstor commented Dec 16, 2024

Copy link
Copy Markdown
Collaborator

@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.

@arafays arafays marked this pull request as draft December 17, 2024 00:14
@arafays

arafays commented Dec 17, 2024

Copy link
Copy Markdown
Contributor Author

@Ujstor converted to draft so that the project doesnt look abandoned :D I will keep a on lookout where I can help.

@Blackwidow-sudo

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants