{"id":15287793,"url":"https://github.com/codemodsquad/babel-plugin-jsx-source-loc","last_synced_at":"2025-07-25T03:32:10.792Z","repository":{"id":57188867,"uuid":"330878763","full_name":"codemodsquad/babel-plugin-jsx-source-loc","owner":"codemodsquad","description":"add a prop like data-source-loc=\"src/foo.js:35:8\" to every JSX element","archived":false,"fork":false,"pushed_at":"2021-01-21T21:29:24.000Z","size":362,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-16T14:18:16.222Z","etag":null,"topics":["babel","jsx","react","transforms"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/codemodsquad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-19T05:54:40.000Z","updated_at":"2022-09-04T06:46:17.000Z","dependencies_parsed_at":"2022-08-28T13:00:51.776Z","dependency_job_id":null,"html_url":"https://github.com/codemodsquad/babel-plugin-jsx-source-loc","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemodsquad%2Fbabel-plugin-jsx-source-loc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemodsquad%2Fbabel-plugin-jsx-source-loc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemodsquad%2Fbabel-plugin-jsx-source-loc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemodsquad%2Fbabel-plugin-jsx-source-loc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codemodsquad","download_url":"https://codeload.github.com/codemodsquad/babel-plugin-jsx-source-loc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227514926,"owners_count":17782641,"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":["babel","jsx","react","transforms"],"created_at":"2024-09-30T15:37:35.361Z","updated_at":"2024-12-01T08:10:34.714Z","avatar_url":"https://github.com/codemodsquad.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# babel-plugin-jsx-source-loc\n\n[![CircleCI](https://circleci.com/gh/codemodsquad/babel-plugin-jsx-source-loc.svg?style=svg)](https://circleci.com/gh/codemodsquad/babel-plugin-jsx-source-loc)\n[![Coverage Status](https://codecov.io/gh/codemodsquad/babel-plugin-jsx-source-loc/branch/master/graph/badge.svg)](https://codecov.io/gh/codemodsquad/babel-plugin-jsx-source-loc)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![npm version](https://badge.fury.io/js/babel-plugin-jsx-source-loc.svg)](https://badge.fury.io/js/babel-plugin-jsx-source-loc)\n\nAdds a `data-source-loc` prop to every JSX element, so that you can quickly look up where an element was rendered\nin the React Dev Tools. This is primarily intended for dev mode, not production.\n\n# Example\n\n### Input\n\n```jsx\nfunction MyComponent() {\n  return (\n    \u003cdiv className=\"foo\"\u003e\n      \u003cAlert variant=\"danger\"\u003e\n        {names.map(name =\u003e (\n          \u003cCard key={name}\u003e{name}\u003c/Card\u003e\n        ))}\n      \u003c/Alert\u003e\n    \u003c/div\u003e\n  )\n}\n```\n\n### output\n\n```jsx\nfunction MyComponent() {\n  return (\n    \u003cdiv className=\"foo\" data-source-loc=\"src/MyComponent.js:3:4\"\u003e\n      \u003cAlert variant=\"danger\" data-source-loc=\"src/MyComponent.js:4:6\"\u003e\n        {names.map(name =\u003e (\n          \u003cCard key={name} data-source-loc=\"src/MyComponent.js:6:10\"\u003e\n            {name}\n          \u003c/Card\u003e\n        ))}\n      \u003c/Alert\u003e\n    \u003c/div\u003e\n  )\n}\n```\n\n# Usage\n\n```\nnpm i --save-dev babel-plugin-jsx-source-loc\n```\n\nAnd add `\"babel-plugin-jsx-source-loc\"` to your babel configuration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemodsquad%2Fbabel-plugin-jsx-source-loc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodemodsquad%2Fbabel-plugin-jsx-source-loc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemodsquad%2Fbabel-plugin-jsx-source-loc/lists"}