{"id":13622738,"url":"https://github.com/bunchtogether/vite-plugin-flow","last_synced_at":"2025-04-15T09:33:45.769Z","repository":{"id":43833582,"uuid":"377605305","full_name":"bunchtogether/vite-plugin-flow","owner":"bunchtogether","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-16T20:09:31.000Z","size":143,"stargazers_count":22,"open_issues_count":3,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-05T18:06:42.032Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bunchtogether.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}},"created_at":"2021-06-16T19:25:35.000Z","updated_at":"2024-10-10T03:35:42.000Z","dependencies_parsed_at":"2022-09-25T01:52:02.032Z","dependency_job_id":null,"html_url":"https://github.com/bunchtogether/vite-plugin-flow","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/bunchtogether%2Fvite-plugin-flow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bunchtogether%2Fvite-plugin-flow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bunchtogether%2Fvite-plugin-flow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bunchtogether%2Fvite-plugin-flow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bunchtogether","download_url":"https://codeload.github.com/bunchtogether/vite-plugin-flow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223668374,"owners_count":17182915,"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-08-01T21:01:23.537Z","updated_at":"2024-11-08T10:30:58.230Z","avatar_url":"https://github.com/bunchtogether.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# vite-plugin-flow\n\nSupport [Flow static type checking](https://flow.org/) in [Vite](https://vitejs.dev/)\n\n## Install\n\n```shell\nnpm install @bunchtogether/vite-plugin-flow --save-dev\n```\n\nor\n\n```shell\nyarn add @bunchtogether/vite-plugin-flow --dev\n```\n\n## Usage\n\n```js\nimport { flowPlugin, esbuildFlowPlugin } from '@bunchtogether/vite-plugin-flow';\n\nexport default {\n  optimizeDeps: {\n    esbuildOptions: {\n      plugins: [esbuildFlowPlugin()]\n    }\n  },\n  plugins: [\n    flowPlugin()\n  ]\n}\n```\n\n## API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n#### Table of Contents\n\n*   [flowPlugin](#flowplugin)\n    *   [Parameters](#parameters)\n*   [esbuildFlowPlugin](#esbuildflowplugin)\n    *   [Parameters](#parameters-1)\n\n### flowPlugin\n\nCreate a Vite plugin object\n\n#### Parameters\n\n*   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Filter options (optional, default `{include:/\\.(flow|jsx?)$/,exclude:/node_modules/,flow:{all:false,pretty:false,ignoreUninitializedFields:false}}`)\n\n    *   `options.include` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [Regexp](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp) | [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u003c([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [Regexp](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp))\u003e)** Strings and/or regular expressions matching file paths to include (optional, default `/\\.(flow|jsx?)$/`)\n    *   `options.exclude` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [Regexp](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp) | [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u003c([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [Regexp](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp))\u003e)** Strings and/or regular expressions matching file paths to exclude (optional, default `/node_modules/`)\n\nReturns **VitePlugin** Returns esbuild plugin object\n\n### esbuildFlowPlugin\n\n*   **See**: [esbuild plugins documentation](https://esbuild.github.io/plugins/#resolve-callbacks)\n\nCreate an esbuild plugin object\n\n#### Parameters\n\n*   `filter` **[RegExp](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp)** Regular expression matching the path a files to be processed (optional, default `/\\.(flow|jsx?)$/`)\n*   `loaderFunction` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Function that accepts the file path and returns the esbuild loader type (optional, default `(path)=\u003e(/\\.jsx$/.test(path)?'jsx':'js')`)\n*   `flowOptions` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options to pass to flow-remove-types (optional, default `{all:false,pretty:false,ignoreUninitializedFields:false}`)\n\n    *   `flowOptions.all` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If true, bypasses looking for an @flow pragma comment before parsing. (optional, default `false`)\n    *   `flowOptions.pretty` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If true, removes types completely rather than replacing with spaces. (optional, default `false`)\n    *   `flowOptions.ignoreUninitializedFields` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If true, removes uninitialized class fields (`foo;`, `foo: string;`)\n        completely rather than only removing the type. THIS IS NOT SPEC\n        COMPLIANT! Instead, use `declare foo: string;` for type-only fields. (optional, default `false`)\n\nReturns **EsbuildPlugin** Returns esbuild plugin object\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbunchtogether%2Fvite-plugin-flow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbunchtogether%2Fvite-plugin-flow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbunchtogether%2Fvite-plugin-flow/lists"}