{"id":20350007,"url":"https://github.com/webbestmaster/css-module-flow-loader","last_synced_at":"2025-03-04T16:26:36.552Z","repository":{"id":89686817,"uuid":"286412683","full_name":"webbestmaster/css-module-flow-loader","owner":"webbestmaster","description":"css module flow loader","archived":false,"fork":false,"pushed_at":"2020-09-20T17:11:02.000Z","size":47,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-18T12:45:46.359Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/webbestmaster.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,"publiccode":null,"codemeta":null}},"created_at":"2020-08-10T07:57:54.000Z","updated_at":"2020-09-20T17:11:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"0efb18d4-7fc9-4e54-a1aa-7e60862ff773","html_url":"https://github.com/webbestmaster/css-module-flow-loader","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"190e7689ccdbad63f0ce03d9dfbac7996f6ab2a6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Fcss-module-flow-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Fcss-module-flow-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Fcss-module-flow-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Fcss-module-flow-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webbestmaster","download_url":"https://codeload.github.com/webbestmaster/css-module-flow-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241879251,"owners_count":20035748,"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-11-14T22:28:30.824Z","updated_at":"2025-03-04T16:26:36.523Z","avatar_url":"https://github.com/webbestmaster.png","language":"JavaScript","readme":"# css-module-flow-loader\n\n[![Build Status](https://travis-ci.org/webbestmaster/css-module-flow-loader.svg?branch=master)](https://travis-ci.org/github/webbestmaster/css-module-flow-loader)\n[![GitHub license](https://img.shields.io/npm/l/css-module-flow-loader)](https://github.com/webbestmaster/css-module-flow-loader/blob/master/license)\n[![npm version](https://img.shields.io/npm/v/css-module-flow-loader.svg?style=flat)](https://www.npmjs.com/package/css-module-flow-loader)\n[![GitHub stars](https://img.shields.io/github/stars/webbestmaster/css-module-flow-loader?style=social\u0026maxAge=2592000)](https://github.com/webbestmaster/css-module-flow-loader/)\n\nWebpack loader for creating [Flow](https://flow.org/) type definitions based on [CSS Modules](https://github.com/css-modules/css-modules) files.\n\nThis gives you:\n- flow type safety showing usage of non existing classes\n- auto-completing for css files in most editors\n\n## How it works\n\nGiven the following css file using CSS Modules:\n```css\n.my_class {\n    display: block;\n}\n```\n\n`css-module-flow-loader` creates the following .flow file next to it:\n\n```javascript\n// @flow strict\n/* This file is automatically generated by css-module-flow-loader */\ndeclare module.exports: {|\n    +'my_class': string;\n|};\n```\n\n## How to use\n\nThe `css-module-flow-loader` need to be added right after `style-loader`:\n\n```sh\n$ npm i -D css-module-flow-loader\n```\n\n```javascript\n{\n  test: /\\.css$/,  // or the file format you are using for your CSS Modules\n  use: [\n    'style-loader',\n    'css-module-flow-loader',\n    // other loaders here ...\n  ]\n}\n```\n\n## Troubleshooting\n\n### Support for other file extensions\n\nTo support `.scss`, `.sass` or similar files extensions you need to update your `.flowconfig` file with the following section:\n\n```\n[options]\n# Extensions\nmodule.file_ext=.js\nmodule.file_ext=.jsx\nmodule.file_ext=.json\nmodule.file_ext=.css\nmodule.file_ext=.scss\nmodule.file_ext=.sass\n// other files used by flow\n```\n\nWithout this Flow might error out with `Required module not found`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebbestmaster%2Fcss-module-flow-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebbestmaster%2Fcss-module-flow-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebbestmaster%2Fcss-module-flow-loader/lists"}