{"id":21861106,"url":"https://github.com/deecewan/jsroutes-types","last_synced_at":"2025-04-14T19:22:08.783Z","repository":{"id":32800741,"uuid":"143035874","full_name":"deecewan/jsroutes-types","owner":"deecewan","description":"Automatically generate flowtypes for code generated by the jsroutes gem for rails","archived":false,"fork":false,"pushed_at":"2022-02-12T06:44:50.000Z","size":269,"stargazers_count":2,"open_issues_count":10,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T07:41:38.985Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deecewan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-31T15:52:08.000Z","updated_at":"2023-11-20T12:38:15.000Z","dependencies_parsed_at":"2022-08-07T18:01:49.591Z","dependency_job_id":null,"html_url":"https://github.com/deecewan/jsroutes-types","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deecewan%2Fjsroutes-types","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deecewan%2Fjsroutes-types/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deecewan%2Fjsroutes-types/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deecewan%2Fjsroutes-types/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deecewan","download_url":"https://codeload.github.com/deecewan/jsroutes-types/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248943415,"owners_count":21186958,"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-28T03:09:56.175Z","updated_at":"2025-04-14T19:22:08.754Z","avatar_url":"https://github.com/deecewan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsroutes-types\n\n\u003e Automatically generate flow types for code generated by the\n\u003e [js-routes](https://github.com/railsware/js-routes) gem for rails\n\n## Installation\n\n```sh\nyarn add -D jsroutes-types # installs to your project - prefix CLI commands with `yarn`\n# or\nyarn add -g jsroutes-types # installs globally - use CLI commands as-is\n# or\nnpm install jsroutes-types # if you use NPM\n```\n\nThis exposes a CLI `jsroutes-types`, and an API (the default `require`)\n\n## CLI\n\nThis is the main usage scenario.\n\nTo generate types for the routes, run:\n\n```sh\njsroutes-types /path/to/generated/routes.js\n```\n\nand you should get a whole lot of types generated and printed to `stdout`.\n\nYou can specify the following options:\n\n- `-o \u003cfile\u003e, --output \u003cfile\u003e` - output the types to a specific file\n- `-x \u003cext\u003e, --extension \u003cext\u003e` - output to the same place as the input, but append `ext`\n\nSee `jsroutes-types --help` for more info.\n\n## API\n\nThe package exposes a very simple API which the CLI is built on.\n\nThe function has the following signature:\n\n```js\nfunction generate(input: string, output: ?string): void;\n```\n\nYou *must* pass in an `input` location. If you don't pass an output location,\nthe result will be output to `stdout`.\n\nThe function does not return anything;\n\n### Example\n\n```js\nconst generate = require('jsroutes-types');\n\ngenerate('/path/to/generated/routes.js', '/path/to/generated/routes.js.flow')\n```\n\n## License\n\nCopyright 2018 David Buchan-Swanson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\nWARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeecewan%2Fjsroutes-types","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeecewan%2Fjsroutes-types","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeecewan%2Fjsroutes-types/lists"}