Closed rhuanbarreto closed 8 months ago
IMO to me a backend application is just that, an application
. Do you need a distinction between frontend and backend?
What's your situation where backend and frontend tasks differ?
for example: build steps for backends are different from SPAs. Backends will load all sources to build a docker image. SPAs will build the HTML/JS/CSS files and upload it to the hosting service.
Maybe adding the possibility to create a customized type with the constraints would make it easier.
@rhuanbarreto You can probably use a tag for this: https://moonrepo.dev/docs/concepts/task-inheritance#scope-by-project-metadata
This is how we offer reusable configs to inherit. An example for Next.js: https://github.com/moonrepo/moon-configs/tree/master/javascript/next
Using tags doesn't actually represent the type because it would also be good to have it categorized inside the VScode extension.
So how do I use the tags to categorize the list in the VScode extension then?
Have an idea of how you want the extension to work?
It would be good to categorize the applications in the projects view then by tags once tags are the entity to get more context about them.
I added a "Tags" view to the vs code extension.
Just checked it. Great addition! Maybe a future improvement could be to add tags as a sub entity in the Projects Tree? Like Applications -> #tag-a -> project_name. Then you could segment the main types for projects with the same tag.
Yeah definitely. I want to revisit it at some point, since the projects/tags is sharing a lot of code and it kind of made it a bit overengineered.
Been thinking about this more, and right now I'm gravitating to a new stack
setting, which would accept backend, frontend, and maybe infra.
I like it! I already use this concept on Pulumi: https://www.pulumi.com/docs/concepts/stack/
Then the metadata could help me group backends/frontends/libraries by which stack I'm working with.
Added a stack
setting in 1.22. https://moonrepo.dev/blog/moon-v1.22
Will update the extension shortly to support this.
Will stack also be available for creating a specific task file for it?
I'll put it on the roadmap.
Is your feature request related to a problem? Please describe.
Today we have 3 types of projects in our monorepo:
For applications and libraries I can simply set the
type: application
ortype: library
and set the common tasks in the.moon/tasks/typescript-application.yml
.For backends I need to use the
unknown
type because it's not supported to have abackend
type. Therefore my request here.Describe the solution you'd like
The ability to set the type field to
backend
. Maybe as a stretch goal to allow other strings. But the use case of having a Backend-only project type is important to any developer to categorize its applications and improve DX.Describe alternatives you've considered
Using tags doesn't actually represent the type because it would also be good to have it categorized inside the VScode extension.