{"id":16774109,"url":"https://github.com/wayou/bazel-ts-example","last_synced_at":"2025-10-09T09:32:52.213Z","repository":{"id":35769484,"uuid":"153161110","full_name":"wayou/bazel-ts-example","owner":"wayou","description":"Example demonstrates building TypeScript \u0026 React with Bazel","archived":false,"fork":false,"pushed_at":"2024-10-29T06:16:42.000Z","size":174,"stargazers_count":26,"open_issues_count":1,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T06:22:36.131Z","etag":null,"topics":["bazel","bazel-examples","bazel-rules","react","sass","typescript"],"latest_commit_sha":null,"homepage":"","language":"Starlark","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/wayou.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}},"created_at":"2018-10-15T18:19:06.000Z","updated_at":"2024-10-26T08:21:23.000Z","dependencies_parsed_at":"2024-10-28T11:41:24.761Z","dependency_job_id":"33b06c59-12d2-4766-a952-558ecef024fd","html_url":"https://github.com/wayou/bazel-ts-example","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/wayou%2Fbazel-ts-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayou%2Fbazel-ts-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayou%2Fbazel-ts-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayou%2Fbazel-ts-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wayou","download_url":"https://codeload.github.com/wayou/bazel-ts-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244890102,"owners_count":20527030,"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":["bazel","bazel-examples","bazel-rules","react","sass","typescript"],"created_at":"2024-10-13T06:48:05.187Z","updated_at":"2025-10-09T09:32:47.192Z","avatar_url":"https://github.com/wayou.png","language":"Starlark","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bazel TypeScript Examples\n\nExamples demonstrate building TypeScript with Bazel.\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ca href=\"https://bazel.build/\"\u003e\u003cimg src=\"https://bazel.build/images/bazel-icon.svg\" height=\"120\"/\u003e\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"http://www.typescriptlang.org/\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/remojansen/logo.ts/master/ts.png\" height=\"120\"/\u003e\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://nodejs.org/en/\"\u003e\u003cimg src=\"https://nodejs.org/static/images/logo.svg\" height=\"120\"/\u003e\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://yarnpkg.com/en/\"\u003e\u003cimg src=\"https://classic.yarnpkg.com/assets/feature-speed.png\" height=\"120\"/\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eBazel\u003c/td\u003e\n        \u003ctd\u003eTypeScript\u003c/td\u003e\n        \u003ctd\u003eNodeJs\u003c/td\u003e\n        \u003ctd\u003eYarn\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\n## Build\n\nRun `bazel query ...` to see all available labels.\n\nRun `yarn serve` to start local dev server with live reload.\n\nRun `yarn stat` to see file statistic of the repo. It will print number of each file extension.\n\n### Setup buidifier\n\nThere's a tool from the official [buildtool repo](https://github.com/bazelbuild/buildtools.git) called buildifier that can format our bazel files.\n\n1. Install the [bazel VSCode extension](https://marketplace.visualstudio.com/items?itemName=DevonDCarew.bazel-code)\n2. Clone [buildtools](https://github.com/bazelbuild/buildtools.git)\n3. Run `bazel //buildifier:buildifier` to build the buildifier.\n4. Set the path for the buildifier generated from above step in VSCode user setting `\"bazel.buildifierPath\": \"private/var/tmp/_bazel_wayou/308cd286b0587bcdbdec05695018ee18/execroot/com_github_bazelbuild_buildtools/bazel-out/darwin-fastbuild/bin/buildifier/darwin_amd64_stripped/buildifier\"`\n5. Enable `\"editor.formatOnSave\": true`\n\n### Troubleshooting\n\n- If all types are discovered then all types need to be included as deps or typescript may error like `TS2688: Cannot find type definition file for 'foo'`.\n- If you move the location of a `ts_devserver` target and try start the server again you may get error that the bazel says cannot load `/the/original/path/of/the/server/MF/file`. Just run `bazel clean --expunge` and try rebuild againa. If that's still not work, try change a port for the server and start again.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwayou%2Fbazel-ts-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwayou%2Fbazel-ts-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwayou%2Fbazel-ts-example/lists"}