{"repo":"Quramy/typed-css-modules","free":true,"listed":false,"github":"https://github.com/Quramy/typed-css-modules","clone":"git clone https://github.com/Quramy/typed-css-modules.git","description":"Creates .d.ts files from CSS Modules .css files","language":"TypeScript","stars":1135,"topics":["typescript","css-modules"],"license":"MIT","category":"cli-tools","readme_excerpt":"typed-css-modules Creates TypeScript definition files from CSS Modules .css files. If you have the following css, typed-css-modules creates the following .d.ts files from the above css: So, you can import CSS modules' class or variable into your TypeScript sources: CLI And exec tcm command. For example, if you have .css files under src directory, exec the following: Then, this creates .css.d.ts files under the directory which has the original .css file. output directory Use -o or --outDir option. For example: file name pattern By default, this tool searches / .css files under . If you can customize the glob pattern, you can use --pattern or -p option. Note the quotes around the glob to -p (they are required, so that your shell does not perform the expansion). watch With -w or --watch , this CLI watches files in the input directory. validating type files With -l or --listDifferent , list any files that are different than those that would be generated. If any are different, exit with a status code 1. camelize CSS token With -c or --camelCase , kebab-cased CSS classes(such as .my-class {...} ) are exported as camelized TypeScript variable name( export const myClass: string ). You can pass --camelCase dashes to only camelize dashes in the class name. Since version 0.27.1 in the webpack css-loader . This will keep upperCase class names intact, e.g.: becomes See also webpack css-loader's camelCase option. named exports (enable tree shaking) With -e or --namedExports , types are exp","default_branch":null,"files":null,"tree":[],"storefront":"/r/Quramy","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Quramy/typed-css-modules/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}