Skip to content
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

Svelte init #343

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft

Svelte init #343

wants to merge 17 commits into from

Conversation

arafays
Copy link
Contributor

@arafays arafays commented Nov 25, 2024

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

arafays commented Nov 25, 2024

  • fixed another error in showing index.html in public folder from react project directory structure in docs.

}
}

// set to false to not re-do in next step
p.AdvancedOptions[string(flags.Tailwind)] = false
} else {
Copy link
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
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
Copy link
Contributor Author

arafays commented Nov 28, 2024

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

arafays commented Dec 2, 2024

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

arafays commented Dec 3, 2024

@Melkeydev fixed themake run command

@Ujstor
Copy link
Collaborator

Ujstor commented Dec 16, 2024

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

arafays commented Dec 17, 2024

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

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.

3 participants