{"id":29562919,"url":"https://github.com/bryanbill/dartify","last_synced_at":"2026-05-20T07:36:09.112Z","repository":{"id":302808834,"uuid":"1013706443","full_name":"bryanbill/dartify","owner":"bryanbill","description":"Generate Dart JS interop bindings from TypeScript declaration files, with modular output and grouped (barrel) exports.","archived":false,"fork":false,"pushed_at":"2025-07-04T10:34:49.000Z","size":52,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-27T05:41:36.801Z","etag":null,"topics":["dart","interop","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/bryanbill.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-04T10:31:20.000Z","updated_at":"2025-07-09T08:37:32.000Z","dependencies_parsed_at":"2025-07-04T10:52:29.639Z","dependency_job_id":"73fc9a93-fbe2-4c33-9423-9d8bd2453d06","html_url":"https://github.com/bryanbill/dartify","commit_stats":null,"previous_names":["bryanbill/dartify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bryanbill/dartify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanbill%2Fdartify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanbill%2Fdartify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanbill%2Fdartify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanbill%2Fdartify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bryanbill","download_url":"https://codeload.github.com/bryanbill/dartify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryanbill%2Fdartify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33250372,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-20T04:48:54.280Z","status":"ssl_error","status_checked_at":"2026-05-20T04:48:10.851Z","response_time":356,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dart","interop","typescript"],"created_at":"2025-07-18T18:01:21.814Z","updated_at":"2026-05-20T07:36:09.094Z","avatar_url":"https://github.com/bryanbill.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003edartify\u003c/h1\u003e\n  \u003cp\u003e\u003cstrong\u003eTypeScript-to-Dart Interop Generator\u003c/strong\u003e\u003c/p\u003e\n  \u003cp\u003eGenerate Dart JS interop bindings from TypeScript declaration files, with modular output and grouped (barrel) exports.\u003c/p\u003e\n\u003c/div\u003e\n\n---\n\n## Features\n\n- **Converts TypeScript `.d.ts` files to Dart JS interop code**\n- **Modular, DRY, and production-ready codebase**\n- **CLI usage via `npx` or local install**\n- **Grouped export (barrel) file generation per folder and at output root**\n- **Jest-based test suite for all modules**\n- **ESM/Node compatibility**\n- **In-code API documentation**\n\n---\n\n## Installation\n\nYou can use dartify directly with `npx` (no install required):\n\n```sh\nnpx dartify \u003coptions\u003e\n```\n\nOr install locally/globally:\n\n```sh\nnpm install -g dartify\n# or\nnpm install --save-dev dartify\n```\n\n---\n\n## Usage\n\n### CLI\n\n```sh\nnpx dartify  \u003cinput_dir\u003e \u003coutput_dir\u003e\n```\n\n### Example\n\n```sh\nnpx dartify  example/types/  example/interops/\n```\n\nThis will generate Dart files for each TypeScript declaration, grouped by folder, with `\u003cfolder\u003e.dart` barrel files in each output folder and at the output root.\n\n---\n\n## How It Works\n\n1. **Parses TypeScript declaration files** using the TypeScript compiler API.\n2. **Maps TypeScript types to Dart JS interop types** (e.g., `string` → `JSString`).\n3. **Generates Dart files** for classes, functions, and type aliases.\n4. **Creates grouped export (barrel) files** per folder and at the output root.\n5. **Ensures all output is modular and ready for Dart consumption.**\n\n---\n\n## Project Structure\n\n- `src/cli.ts` — CLI entrypoint\n- `src/generator/` — Modular generator logic:\n  - `barrel.ts` — Barrel (grouped export) file generation\n  - `dartWriter.ts` — Dart file writing utilities\n  - `fileUtils.ts` — File system helpers\n  - `generateClass.ts` — Class code generation\n  - `generateFunction.ts` — Function code generation\n  - `generateNode.ts` — AST traversal and code generation\n  - `generateTypeAlias.ts` — Type alias code generation\n  - `mapType.ts` — TypeScript-to-Dart type mapping\n  - `typeMap.ts` — Type name to file path mapping\n- `src/__tests__/` — Jest test files for all modules\n- `package.json`, `tsconfig.json`, `jest.config.js` — Configuration\n\n---\n\n## Development\n\n### Build\n\n```sh\nnpm run build\n```\n\n### Test\n\n```sh\nnpm test\n```\n\n### Local CLI Development\n\n```sh\nnpm run build\nnpm link\ndartify \u003cinput_dir\u003e \u003coutput_dir\u003e\n```\n\n---\n\n## API Documentation\n\nAll modules and functions are documented with JSDoc-style comments. See the source files in `src/generator/` for details.\n\n---\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryanbill%2Fdartify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbryanbill%2Fdartify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryanbill%2Fdartify/lists"}