{"id":16853267,"url":"https://github.com/chmln/typescript-css-modules-loader","last_synced_at":"2025-09-03T00:47:21.319Z","repository":{"id":81094165,"uuid":"100731969","full_name":"chmln/typescript-css-modules-loader","owner":"chmln","description":"Loader to generate typescript declaration files (.d.ts) from css modules","archived":false,"fork":false,"pushed_at":"2017-08-21T15:51:58.000Z","size":35,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-24T16:43:32.595Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chmln.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-08-18T16:42:47.000Z","updated_at":"2018-04-16T07:41:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"cfe57b13-b98e-45e4-bf30-d99c13a10620","html_url":"https://github.com/chmln/typescript-css-modules-loader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmln%2Ftypescript-css-modules-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmln%2Ftypescript-css-modules-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmln%2Ftypescript-css-modules-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmln%2Ftypescript-css-modules-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chmln","download_url":"https://codeload.github.com/chmln/typescript-css-modules-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244199175,"owners_count":20414601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T13:50:51.627Z","updated_at":"2025-03-18T10:23:43.805Z","avatar_url":"https://github.com/chmln.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# typescript-css-modules-loader\nLoader to generate typescript declaration files (.d.ts) from css modules.\n\nShould be used in tandem with `enhanced-css-loader`.\n\n## Installation\n\n`yarn add typescript-css-modules`\n\n`npm i typescript-css-modules`\n\n## Usage with `.css` files\n\n```js\n{\n  test: /\\.css$/,\n  loaders: [\n    { loader: \"style-loader\" },\n    { loader: \"typescript-css-modules-loader\" },\n  ],\n}\n```\n\n## Usage with preprocessors (Sass, Stylus, Less, etc)\n\nIf you're using a preprocessor, put `\"typescript-css-modules-loader\"` just before your preprocessor loader.\n\n```js\n{\n  test: /\\.styl$/,\n  loaders: [\n    { loader: \"style-loader\" },\n    { loader: \"typescript-css-modules-loader\" },\n    { loader: \"stylus-loader\" },\n  ],\n}\n```\n\n## Example\nIn: `styles.styl`\n\n```stylus\n.component\n  display flex\n```\n\nOut: `styles.styl.d.ts`\n```typescript\ndeclare const styles: {\n  \"component\": () =\u003e string,\n}\n\nexport = styles\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchmln%2Ftypescript-css-modules-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchmln%2Ftypescript-css-modules-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchmln%2Ftypescript-css-modules-loader/lists"}