{"id":28146459,"url":"https://github.com/aspect-build/rules_ts","last_synced_at":"2026-01-16T13:36:57.686Z","repository":{"id":37038267,"uuid":"484576367","full_name":"aspect-build/rules_ts","owner":"aspect-build","description":"Bazel rules for the `tsc` compiler from http://typescriptlang.org","archived":false,"fork":false,"pushed_at":"2026-01-15T02:58:38.000Z","size":1496,"stargazers_count":130,"open_issues_count":69,"forks_count":80,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-15T04:45:51.924Z","etag":null,"topics":["bazel","bazel-rules","typescript"],"latest_commit_sha":null,"homepage":"","language":"Starlark","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/aspect-build.png","metadata":{"funding":{"github":null,"patreon":null,"open_collective":"aspect-build","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null},"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-04-22T21:28:31.000Z","updated_at":"2026-01-15T02:58:43.000Z","dependencies_parsed_at":"2026-01-02T02:06:58.142Z","dependency_job_id":null,"html_url":"https://github.com/aspect-build/rules_ts","commit_stats":{"total_commits":484,"total_committers":34,"mean_commits":"14.235294117647058","dds":0.6260330578512396,"last_synced_commit":"fbb8eb4c90432fdb44712c0da9da6c60f7294c05"},"previous_names":[],"tags_count":87,"template":false,"template_full_name":"bazel-contrib/rules-template","purl":"pkg:github/aspect-build/rules_ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspect-build%2Frules_ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspect-build%2Frules_ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspect-build%2Frules_ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspect-build%2Frules_ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aspect-build","download_url":"https://codeload.github.com/aspect-build/rules_ts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspect-build%2Frules_ts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"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":["bazel","bazel-rules","typescript"],"created_at":"2025-05-14T23:12:36.450Z","updated_at":"2026-01-16T13:36:57.660Z","avatar_url":"https://github.com/aspect-build.png","language":"Starlark","funding_links":["https://opencollective.com/aspect-build"],"categories":["Starlark","Development Tools Mcp Servers"],"sub_categories":[],"readme":"# Bazel rules for TypeScript\n\nThis is the canonical ruleset for using Bazel with TypeScript, based on\n\u003chttps://github.com/aspect-build/rules_js\u003e.\n\nMany companies are successfully building with rules_ts. If you're getting value from the project, please let us know! Just comment on our [Adoption Discussion](https://github.com/aspect-build/rules_js/discussions/1000).\n\nThis is a high-performance alternative to the `@bazel/typescript` npm package from rules_nodejs.\nThe `ts_project` rule here is identical to the one in rules_nodejs, making it easy to migrate.\nSince rules_js always runs tools from the bazel-out tree, rules_ts naturally fixes most usability bugs with rules_nodejs:\n\n-   Freely mix generated `*.ts` and `tsconfig.json` files in the bazel-out tree with source files\n-   Fixes the need for any `rootDirs` settings in `tsconfig.json` as reported in https://github.com/microsoft/TypeScript/issues/37378\n-   \"worker mode\" for `ts_project` now shares workers across all targets, rather than requiring one worker pool per target\n\nrules_ts is just a part of what Aspect provides:\n\n-   _Need help?_ This ruleset has support provided by https://aspect.build/services.\n-   See our other Bazel rules, especially those built for rules_js, linked from \u003chttps://github.com/aspect-build\u003e\n\n## Installation\n\nFollow instructions from the release you wish to use:\n\u003chttps://github.com/aspect-build/rules_ts/releases\u003e\n\n## Examples\n\nThere are a number of examples in [the examples/ folder](https://github.com/aspect-build/rules_ts/tree/main/examples) and\nlarger examples in the [bazel-examples repository](https://github.com/aspect-build/bazel-examples) using rules_ts such as\n[jest](https://github.com/aspect-build/bazel-examples/tree/main/jest), [react](https://github.com/aspect-build/bazel-examples/tree/main/react-cra),\n[angular](https://github.com/aspect-build/bazel-examples/tree/main/angular).\n\nIf you'd like an example added, you can fund a [Feature Request](https://github.com/aspect-build/rules_ts/issues/new/choose).\n\n## Usage\n\nSee the API documentation in [the docs/ folder](https://github.com/aspect-build/rules_ts/tree/main/docs).\n\n### From a BUILD file\n\nThe most common use is with the [`ts_project` macro](./docs/rules.md#ts_project) which invokes a\ntranspiler you configure to transform source files like `.ts` files into outputs such as `.js` and `.js.map`,\nand the [`tsc` CLI](https://www.typescriptlang.org/docs/handbook/compiler-options.html) to type-check\nthe program and produce `.d.ts` files.\n\n### In a macro\n\nMany organizations set default values, so it's common to write a [macro] to wrap `ts_project`, then\nensure that your developers load your macro rather than loading from `@aspect_rules_ts` directly.\n\n[macro]: https://bazel.build/extending/macros\n\n### BUILD file generation\n\nAspect provides a TypeScript BUILD file generator as part of the [Aspect CLI](https://aspect.build/cli).\nRun `aspect configure` to create or update `BUILD.bazel` files as you edit TypeScript sources.\nSee \u003chttps://docs.aspect.build/cli/commands/aspect_configure\u003e.\n\n### Advanced: custom rules\n\nIf you know how to write Bazel rules, you might find that `ts_project` doesn't do what you want.\n\nOne way to customize it is to peel off one layer of indirection, by calling the `ts_project_rule`\ndirectly. This bypasses our default setting logic, and also the validation program which checks that\nts_project attributes are well-formed.\n\nYou can also write a custom rule from scratch. We expose helper functions from /ts/private in this\nrepo. Be aware that these are not a public API, so you may have to account for breaking changes\nwhich aren't subject to our usual semver policy.\n\n# Telemetry \u0026 privacy policy\n\nThis ruleset collects limited usage data via [`tools_telemetry`](https://github.com/aspect-build/tools_telemetry), which is reported to Aspect Build Inc and governed by our [privacy policy](https://www.aspect.build/privacy-policy).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faspect-build%2Frules_ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faspect-build%2Frules_ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faspect-build%2Frules_ts/lists"}