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

Allow use custom extensions #98

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

justgook
Copy link

Add the ability to create custom CSS file extensions - useful when you want to split CSS main definition from class-names or use it with css-modules

@tancredi
Copy link
Owner

tancredi commented Feb 8, 2021

Hi @justgook - Firstly, thanks for the contribution!

Is this just for CSS modules? If so, I'm thinking of supporting CSS modules out of the box.

While I'm quite interested in the idea of adding a plugin system to allow other to add new asset generators outside of the core library, what I'm concerned with here is it will basically have little validation and fall back on the CSS template, which is rather specific and I don't see why (different people would like to generate different asset types, some may not be from HBS templates and for most people using the tool the first time validation of the --asset-types can be quite relevant IMO)

TL;TR; Would you need this if CSS modules was supported in a simpler way?

@justgook
Copy link
Author

justgook commented Feb 9, 2021

that is not just for css-modules - that for the ability to use some custom extensions - that i can embed, or generate multiple files for some more advanced, and ability to create my own templates - mustache, pcss, stylus, ts+d.ts, and any other stuff. So - maybe - there could be some custom flag, to create custom extensions, and if that flag is not provided then fall back to default behavior.

Other part that i would be aloso interested (by now im just creating new extension and then renaming it to css) - when you need to create 2 css files - first with global stuff (font declaration) and the second is just classnames, that im using as css-modules, to import it in other css files and use composes to add icons to components - that would be a nice addition to be able to create different files with same extension

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.

None yet

2 participants