{"id":15676852,"url":"https://github.com/joseluisq/go-tspath","last_synced_at":"2025-10-08T14:15:51.332Z","repository":{"id":57537808,"uuid":"200590874","full_name":"joseluisq/go-tspath","owner":"joseluisq","description":"A fast and persistent Typescript paths replacer written in Go.","archived":false,"fork":false,"pushed_at":"2019-10-10T21:49:29.000Z","size":637,"stargazers_count":14,"open_issues_count":6,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-14T12:42:52.725Z","etag":null,"topics":["paths-replacer","replacer","typescript","typescript-paths"],"latest_commit_sha":null,"homepage":"","language":"Go","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/joseluisq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-05T05:53:59.000Z","updated_at":"2024-07-21T08:44:30.000Z","dependencies_parsed_at":"2022-09-04T13:51:09.177Z","dependency_job_id":null,"html_url":"https://github.com/joseluisq/go-tspath","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/joseluisq/go-tspath","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseluisq%2Fgo-tspath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseluisq%2Fgo-tspath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseluisq%2Fgo-tspath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseluisq%2Fgo-tspath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joseluisq","download_url":"https://codeload.github.com/joseluisq/go-tspath/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseluisq%2Fgo-tspath/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278956386,"owners_count":26075238,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["paths-replacer","replacer","typescript","typescript-paths"],"created_at":"2024-10-03T16:06:21.649Z","updated_at":"2025-10-08T14:15:51.285Z","avatar_url":"https://github.com/joseluisq.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go TSPath [![Build Status](https://travis-ci.org/joseluisq/go-tspath.svg?branch=master)](https://travis-ci.org/joseluisq/go-tspath) [![codecov](https://codecov.io/gh/joseluisq/go-tspath/branch/master/graph/badge.svg)](https://codecov.io/gh/joseluisq/go-tspath) [![Go Report Card](https://goreportcard.com/badge/github.com/joseluisq/go-tspath)](https://goreportcard.com/report/github.com/joseluisq/go-tspath) [![GoDoc](https://godoc.org/github.com/joseluisq/go-tspath?status.svg)](https://godoc.org/github.com/joseluisq/go-tspath)\n\n\u003e A fast [Typescript paths](https://www.typescriptlang.org/docs/handbook/module-resolution.html) replacer written in [Go](https://golang.org/). ⚡\n\n**go-tspath** replaces directly [Typescript paths aliases](https://www.typescriptlang.org/docs/handbook/module-resolution.html) into JS files with real paths based on `tsconfig.json`, no more runtime replacers.\n\n![go-tspath performing replacements in a production Typescript code base](./preview.png)\n\n_Screenshot of `go-tspath` performing replacements in a Typescript code base project with more than 200 JS files and around 5857 lines of code._\n\n## Status\n\n**go-tspath** was tested replacing custom path aliases in a Typescript medium size project with desired results (shown in screenshot above).\nBut there are some features and more testing cases (community user feedback) to do.\nSo, It can considered as **Beta** yet. Contributions will be very appreciated.\n\n## Installation\n\n🚀 Download the latest **go-tspath** binary for your specific platform at [go-tspath/releases](https://github.com/joseluisq/go-tspath/releases).\n\n## Usage\n\n```sh\n# 1. Build TS files via tsc\n# 2. Replace TS paths\ngo-tspath -config=./tsconfig.replace.json\n# 3. Just run your app\n# node main.js\n```\n\n## Known limitations\n\n- No support for JSON5 format of `tsconfig.json`. But works using a dedicated `tsconfig.json` file with your custom path aliases. See [`sample/tsconfig.replace.json`](https://github.com/joseluisq/go-tspath/blob/master/sample/tsconfig.replace.json)\n- Limited `compilerOptions` settings. Only `baseUrl`, `paths` and `outDir` are supported. See [`CompilerOptions struct`](https://github.com/joseluisq/go-tspath/blob/master/pkg/tsconfig/tsconfig.go#L20).\n- No support for `tsconfig.json` features like `extends`, `exclude` or similar.\n\n## Typescript code example\n\nSee an example at [`sample`](https://github.com/joseluisq/go-tspath/tree/master/sample) directory.\n\n## API\n\n```sh\n~\u003e go-tspath --help\nUsage of go-tspath:\n  -config string\n    \tSpecifies the Typescript configuration file. (default \"./tsconfig.json\")\n```\n\n## Contributions\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in current work by you, as defined in the Apache-2.0 license, shall be dual licensed as described below, without any additional terms or conditions.\n\nFeel free to send some [Pull request](https://github.com/joseluisq/go-tspath/pulls) or [issue](https://github.com/joseluisq/go-tspath/issues).\n\n## License\n\nThis work is primarily distributed under the terms of both the [MIT license](LICENSE-MIT) and the [Apache License (Version 2.0)](LICENSE-APACHE).\n\n© 2019 [Jose Quintana](https://git.io/joseluisq)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoseluisq%2Fgo-tspath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoseluisq%2Fgo-tspath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoseluisq%2Fgo-tspath/lists"}