{"id":22771507,"url":"https://github.com/nivisi/vscode-dart-build-runner-tools","last_synced_at":"2025-04-15T05:30:01.111Z","repository":{"id":230779519,"uuid":"780116242","full_name":"nivisi/vscode-dart-build-runner-tools","owner":"nivisi","description":"Run build_runner commands directly from VS Code’s context menu, Command Palette, and keyboard shortcuts.","archived":false,"fork":false,"pushed_at":"2025-02-12T17:23:49.000Z","size":737,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-03-28T16:21:22.326Z","etag":null,"topics":["build-runner","code-generation","dart","flutter","ide","package","plugin","vscode"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=nivisi.dart-build-runner-tools","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/nivisi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-03-31T18:29:19.000Z","updated_at":"2025-02-12T17:23:48.000Z","dependencies_parsed_at":"2024-03-31T22:25:34.121Z","dependency_job_id":"85c5fe3c-5a54-4097-a665-78302f262b7e","html_url":"https://github.com/nivisi/vscode-dart-build-runner-tools","commit_stats":null,"previous_names":["nivisi/vscode-dart-build-runner-tools"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nivisi%2Fvscode-dart-build-runner-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nivisi%2Fvscode-dart-build-runner-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nivisi%2Fvscode-dart-build-runner-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nivisi%2Fvscode-dart-build-runner-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nivisi","download_url":"https://codeload.github.com/nivisi/vscode-dart-build-runner-tools/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249014270,"owners_count":21198555,"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":["build-runner","code-generation","dart","flutter","ide","package","plugin","vscode"],"created_at":"2024-12-11T16:14:03.277Z","updated_at":"2025-04-15T05:30:01.105Z","avatar_url":"https://github.com/nivisi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter build_runner VS Code Tools [![marketplace][version-img]][marketplace-url] [![gh][github-img]][github]\n\n[`build_runner`](https://pub.dev/packages/build_runner) integrated right into VS Code. Run it on specific files / projects from context menu or command palette.\n\n![vscode_showcase_part](https://github.com/nivisi/vscode-dart-build-runner-tools/assets/33932162/d8d3b376-fb47-462b-b6ca-f387dc84a2c8)\n\n## Features\n\n### Menu (Command Palette)\n\n`build_runner` can be ran on the whole workspace, specific project or on the active file through a build_runner menu. Open it by using a predefined keybinding `ctrl+B` + `ctrl+R` (Windows / Mac / Linux):\n\n\u003cimg width=600 alt=\"Menu\" src=\"https://github.com/nivisi/vscode-dart-build-runner-tools/assets/33932162/3b303cba-e5f0-4e1d-83a4-9562ad273635\"/\u003e\n\n### File context menu\n\nIf you want to run `build_runner` on a specific file, e.g. `user.g.dart`. Right click the file (or files) and select the command you need, **Build This** / **Watch This**.\n\n- **Build This**: Regenerate the code for specified files directly targeting it with `build_runner`.\n- **Watch This**: Continuously monitor and regenerate code for specified files, automatically applying changes as you work.\n\nYou can run `build_runner` on part files by selecting the main file (e.g., `user.dart`). The extension will identify all associated part files, such as `user.freezed.dart` and `user.g.dart`, and execute the command on them.\n\n- **Build Parts**: Regenerate the code for `part`s of selected files.\n- **Watch Parts**: Continuously monitor and regenerate code for `part`s of specified files, automatically applying changes as you work.\n\n\u003cimg width=400 alt=\"Context menu\" src=\"https://github.com/nivisi/vscode-dart-build-runner-tools/assets/33932162/767e8620-bc03-4821-bc78-ef9bd6cba749\"/\u003e\n\n## How does it work?\n\n`build_runner` has a parameter `build-filter` that allows to specify which files to include for code generation.\n\n```bash\ndart build_runner build --build-filter=lib/user.g.dart\n```\n\n...and instead of regenerating the whole codebase, it will only regenerate `lib/user.g.dart`. Although running this command with terminal is not always convenient (especially if you want to run it on multiple files). This VS Code extension puts this command to your context menu. So just right click the needed files, select the required command and you're covered.\n\nOnce ran, it collects required files (part directives for **part** commands and selected files for **this** commands) and exectues the `build`/`watch` command in a new terminal window.\n\n**Important**: *Generated* files must be used, not *source* files. E.g. if you have a **user.dart** that is used to generate **user.freezed.dart** class, the freezed class must be used as a parameter.\n\n## FAQ\n\n### Are monorepos supported?\n\nYes, the extension works in monorepos. The [build_runner menu](#menu-command-palette)) lists all supported projects. When working with files, the extension automatically detects the associated project and runs code generation for that project.\n\n### How do I delete-conflicting-outputs?\n\nIf you want to add / remove this flag, you can enable / disable it in the settings of this extension. Or you can open the command palette and run `Enable / Disable delete conflicting outputs` command.\n\n### Can I run this on folders?\n\nYes, you can run this on both files and folders. Speaking of folders, only the `part` type of commands is supported. It checks all the files within a folder (and subfolders), collects the part directives and runs a `build_runner`.\n\n![vscode_showcase_folder](https://github.com/nivisi/vscode-dart-build-runner-tools/assets/33932162/ccbe55e7-8310-466e-a0d3-8cf63e28f1b8)\n\n### Is multiselect supported?\n\nYes, you can run this command on multiple files / folders at once.\n\n![vscode_showcase_multiselect](https://github.com/nivisi/vscode-dart-build-runner-tools/assets/33932162/a6c8eb75-1a32-4a8e-a3a6-aed04e2f0159)\n\n### Can I run this in parallel?\n\nYes, the command is ran in a new terminal window each time it is executed. Meaning that you can run the `watch` command on the `File A` and then run the `build` command on the `File B`. For your convenience, you can rename terminal windows yourself to not mix them up.\n\n![vscode_showcase_parallel](https://github.com/nivisi/vscode-dart-build-runner-tools/assets/33932162/ff72eee9-a2b2-466a-8ce2-94c7d7f297e7)\n\n\u003c!-- References --\u003e\n\n[github]: https://github.com/nivisi/vscode-dart-build-runner-tools\n[github-img]: https://img.shields.io/badge/GitHub-Source%20Code-181717?logo=github\n[version-img]: https://img.shields.io/badge/marketplace-v1.2.5-007ACC?logo=visualstudiocode\n[marketplace-url]: https://marketplace.visualstudio.com/items?itemName=nivisi.dart-build-runner-tools\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnivisi%2Fvscode-dart-build-runner-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnivisi%2Fvscode-dart-build-runner-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnivisi%2Fvscode-dart-build-runner-tools/lists"}