fantasticon
fantasticon copied to clipboard
Allow use custom extensions
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
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?
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