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

Move the default frontend scaffold into a separate onboarding command #5

Closed
wants to merge 1 commit into from

Conversation

mattdinthehouse
Copy link

From Discord the other day:

MD: Is there any vision for frontend or is Tempest gonna do its best to stay out of that? I can see that tempest/app has already got Tailwind by default
Brent: Tailwind for convenience, but I don’t want people to feel locked in.
MD: imo it can be a bit "fly in my soup" - what about one of those normalise css files from a cdn so there's no need for even a package.json in tempest/app? just thinking about avoiding the frontend wars 😂
Brent: We can defintily think about how to improve it, I don't have a strong opinion on the matter. Everything frontend kind of sucks :p
MD: lmao yeah neither do i - but that nightmare what made me think of how to avoid it in the first place 💩

This PR removes Tailwind from the default tempest/app install in favour of a short bit of plain CSS, but adds a post-create-project-cmd hook to the composer.json file to allow users to reinstall it via a separate tempest/scaffold package I started throwing together - https://github.com/mattdinthehouse/tempest-scaffold

Because frontend is such a heated debate I feel it's better to provide some starter kits and ask people what they want

I'm picturing that this tempest/scaffold package would eventually have templates for things like Authentication too, similar to Laravel's laravel/ui package but baked into the composer create-project ... flow for easier setup

…`post-create-project-cmd` hook that runs a setup wizard via `tempest/scaffold`
@brendt
Copy link
Member

brendt commented Sep 25, 2024

👏 There's so much potential here, and it's so great to see a third-party Tempest package 🎉 We're definitely gonna merge this, but first let's discuss a couple of things. My first question: the scaffold commands should live somewhere within Tempest — I don't know yet where. It could be a separate tempest/scaffold package that's included with the tempest/app? WDYT?

Next: @aidan-casey wdyt? We've been talking about code generation in general as well. I don't think that should be a blocker for now, but we need to make sure tempest/scaffold (or something else) gets updated in time. Same for the upcoming filesystem.

Also: any other templates you had in mind?

@mattdinthehouse
Copy link
Author

Thanks @brendt 😊

My first question: the scaffold commands should live somewhere within Tempest — I don't know yet where. It could be a separate tempest/scaffold package that's included with the tempest/app? WDYT?

Agree - I prefer to hand it over to tempest mainline so it can live at tempest/scaffold in packagist and tempestphp/tempest-scaffold on github, especially if it's going to be default dev dependency of tempest/app

We've been talking about code generation in general as well. I don't think that should be a blocker for now, but we need to make sure tempest/scaffold (or something else) gets updated in time. Same for the upcoming filesystem.

I'm happy to keep the scaffold up to date, and honestly if you know a better way of doing it then let me know - I briefly looked at diff/patching packages but found most depended on running shell_exec which isn't a guarantee, and I didn't want to go too far down a rabbit hole just yet

Also: any other templates you had in mind?

The obvious ones for frontend are:

  • bootstrap with postcss
  • react/vue/etc with vite or webpack

But I was also picturing some authentication templates but I wasn't sure if you had a vision for that?

@brendt
Copy link
Member

brendt commented Sep 26, 2024

But I was also picturing some authentication templates but I wasn't sure if you had a vision for that?

Yeah, that would be nice as well. Still need to figure out how we need to do that, but it's definitely something we should have

@mattdinthehouse
Copy link
Author

I saw your poll on Discord and tempestphp/tempest-framework#493 so I'll add an authentication UI scaffold that calls the Authenticator interface when that's stable and merged, and I'll add those easy frontend compile chains during the week 😊

@brendt
Copy link
Member

brendt commented Oct 11, 2024

Sorry for being silent on this so long. Could you PR your package to tempest/scaffold first? I made a repo for it: https://github.com/tempestphp/tempest-scaffold

@aidan-casey
Copy link
Member

@brendt shouldn't this be in tempest/cli?

@brendt
Copy link
Member

brendt commented Oct 11, 2024

Oh yes, I forgot about that 🫣 Yeah it should go in there: https://github.com/tempestphp/cli

(@aidan-casey why did you call that repo cli and not tempest-cli)?

@mattdinthehouse
Copy link
Author

mattdinthehouse commented Oct 11, 2024

Sorry for being silent on this so long

Likewise! I'm overseas until Thursday so didn't get time to add anything before I left...

https://github.com/tempestphp/cli looks like a sample project rather than a package?

@aidan-casey
Copy link
Member

@aidan-casey why did you call that repo cli and not tempest-cli

Because is a separate project, not a package. Given that, I followed the convention highlight gives us.

looks like a sample project rather than a package?

It's an actual project. Will be a CLI tool you can install locally or into a project to do various tempest stuff.

@brendt
Copy link
Member

brendt commented Dec 12, 2024

Closing in favor of #9, we might revisit it later because I think there are some interesting ideas in this PR still, but I feel like we need a bit more time using Tempest in practice before locking into a solution

@brendt brendt closed this Dec 12, 2024
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