{"id":13834685,"url":"https://github.com/dropbox/ts-transform-react-jsx-source","last_synced_at":"2025-04-30T22:23:07.439Z","repository":{"id":33976888,"uuid":"164952873","full_name":"dropbox/ts-transform-react-jsx-source","owner":"dropbox","description":"TypeScript AST Transformer that adds source file and line number to JSX elements","archived":false,"fork":false,"pushed_at":"2023-07-25T22:50:21.000Z","size":879,"stargazers_count":12,"open_issues_count":18,"forks_count":10,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-25T02:04:25.830Z","etag":null,"topics":["ast","compiler","debug","jsx","react","transform","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/dropbox.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2019-01-09T23:12:49.000Z","updated_at":"2023-01-29T21:44:39.000Z","dependencies_parsed_at":"2024-01-15T18:54:34.722Z","dependency_job_id":"e19c33fe-b0c2-4260-b9f8-9bbd27e08e97","html_url":"https://github.com/dropbox/ts-transform-react-jsx-source","commit_stats":{"total_commits":60,"total_committers":7,"mean_commits":8.571428571428571,"dds":0.75,"last_synced_commit":"b78f58d609c96f941d264edde8347507dac3e64f"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbox%2Fts-transform-react-jsx-source","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbox%2Fts-transform-react-jsx-source/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbox%2Fts-transform-react-jsx-source/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbox%2Fts-transform-react-jsx-source/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dropbox","download_url":"https://codeload.github.com/dropbox/ts-transform-react-jsx-source/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251790295,"owners_count":21644199,"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":["ast","compiler","debug","jsx","react","transform","typescript"],"created_at":"2024-08-04T14:00:51.034Z","updated_at":"2025-04-30T22:23:07.414Z","avatar_url":"https://github.com/dropbox.png","language":"TypeScript","readme":"# ts-transform-react-jsx-source\n\n![build status](https://travis-ci.org/dropbox/ts-transform-react-jsx-source.svg?branch=master)\n\nThis is a TypeScript AST Transformer that adds source file and line number to JSX elements, similar to [babel-plugin-transform-react-jsx-source](https://babeljs.io/docs/en/babel-plugin-transform-react-jsx-source).\n\n## Usage\n### Custom compiler\nFirst of all, you need some level of familiarity with the [TypeScript Compiler API](https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API).\n\n`compile.ts` \u0026 tests should have examples of how this works.\n\n### ts-loader\nYou can add this in your webpack config `ts-loader`.\n```\nimport {transform} from 'ts-transform-react-jsx-source';\n// webpack config\n...\n    rules: [\n      {\n        test: /\\.tsx?$/,\n        use: [\n          {\n            loader: 'ts-loader',\n            options: {\n              getCustomTransformers() {\n                return {\n                  before: [transform()],\n                };\n              },\n            },\n          },\n        ],\n        exclude: /node_modules/,\n      },\n```\n\n## License\n\nCopyright (c) 2018 Dropbox, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.","funding_links":[],"categories":["Transformers"],"sub_categories":["React"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropbox%2Fts-transform-react-jsx-source","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdropbox%2Fts-transform-react-jsx-source","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropbox%2Fts-transform-react-jsx-source/lists"}