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

Specific generators for components, sections and pages #6

Open
iduuck opened this issue Sep 22, 2020 · 11 comments
Open

Specific generators for components, sections and pages #6

iduuck opened this issue Sep 22, 2020 · 11 comments
Labels
discussion help wanted Extra attention is needed

Comments

@iduuck
Copy link
Member

iduuck commented Sep 22, 2020

No description provided.

@iduuck iduuck added documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed labels Sep 22, 2020
@visualcookie
Copy link
Contributor

What's the motivation behind this and how should this exactly work? @iduuck

In my editor I use snippets from Snipsnap, so idk if we really do require some sorta command-line tool to create those files. (At least, that's what I understood from the title.)

@iduuck
Copy link
Member Author

iduuck commented Sep 23, 2020

I thought of something like this, which is changing with the projects needs: https://github.com/diegohaz/generact

@chmtt
Copy link

chmtt commented Sep 23, 2020

In my opinion this would be a great idea and i guess it saves a lot of time.

@visualcookie
Copy link
Contributor

visualcookie commented Sep 23, 2020

Wasn't the initial intention behind this, that we would not have generators because that would cause maintenance and a lot of overhead that's not really necessary?

@chmtt Could you please state how this exactly would save time? In my pov it takes longer to execute this instead of creating the files myself.

@visualcookie
Copy link
Contributor

@iduuck Have checked out generact and I have to admit, it is larger than React:
https://bundlephobia.com/[email protected]
https://bundlephobia.com/[email protected]

And the package itself includes tons of peers, which is super bloaty:
https://npm.anvaka.com/#/view/2d/generact

What we can do, if this is really needed, create a seperate repository/project for people to use when they feel like the need to use it. I just want to keep the whole boilerplate simple and not add some more build/loadtime.

@chmtt
Copy link

chmtt commented Sep 24, 2020

@visualcookie Sure, the time aspect depends on file naming and folder structure. I only looked at the example with 3 same-named files and thought this would be nice. Since we don't have this type of file structure this wouldn't be a timesaver anymore.

@visualcookie
Copy link
Contributor

@visualcookie Sure, the time aspect depends on file naming and folder structure. I only looked at the example with 3 same-named files and thought this would be nice. Since we don't have this type of file structure this wouldn't be a timesaver anymore.

The thing is, for most components I don't create 3 files anymore. I have the types in the same file and the styles as well, because otherwise I would have problems with autoimport since everything is named export interface Props or export const Wrapper = styled.div. Hence why I would leave this optional.

In our dev weekly we had about that we also decided on not to do any kinda bloaty, heavy or generator stuff. It basically doesn't belong to a boilerplate, more to a framework, which we don't want to operate here.

@visualcookie
Copy link
Contributor

@iduuck For our IntelliJ users, there do exist file templates, You can utilize these. https://www.jetbrains.com/help/idea/using-file-and-code-templates.html

@visualcookie visualcookie added discussion and removed documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed labels Sep 24, 2020
@iduuck
Copy link
Member Author

iduuck commented Sep 24, 2020

We discussed in the developer weekly, and came to the conclusion, that we might need to check for some more generator libraries (since generact isn't fitting the expected use case properly).

@visualcookie @chmtt @LoRaetz Please think about this, and suggest some more libraries.

@iduuck iduuck added the help wanted Extra attention is needed label Sep 24, 2020
@chmtt
Copy link

chmtt commented Nov 5, 2020

I guess a generator wouldn't be necessary anymore. Since we have flat folder/file structures it wouldn't save time.

@visualcookie
Copy link
Contributor

As I already stated, I don't see a CLI generating a base structure for components and such. We are developers and we should be able to find other solutions than a bloaty CLI doing it's work. There are much more convenient ways in each IDE/Editor called snippets.

As far as my knowledge of IntelliJ is, they also support a basic file structure when set extension like .tsx is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants