Quramy / typed-css-modules

Creates .d.ts files from CSS Modules .css files
MIT License
1.03k stars 68 forks source link

Ability to compile to a single default export #27

Open flying-sheep opened 7 years ago

flying-sheep commented 7 years ago

rollup-plugin-postcss exports styles as default export.

i’d like to have this optionally output

declare namespace <basename> {
    const class1: string
    const class2: string
}
export default <basename>

(with <basename> being the camelized file name sans .css)

vincerubinetti commented 10 months ago

I'm not sure if this is the same thing this issue is asking for, but...

It would be great to be able to just export a single definition file, and scope styles to specific file paths (if that's even possible in TS...). Having a ton of extra .d.ts files really clutters up the repo, both in exploring the files locally and when looking at diffs. It'd be nice if it was just one big file that changed that could be safely ignored (and collapsed by default like in github's UI) like a lock file.