{"id":16403904,"url":"https://github.com/siddharthkp/babel-plugin-styled-components-require","last_synced_at":"2025-09-08T09:31:36.323Z","repository":{"id":66101263,"uuid":"80839212","full_name":"siddharthkp/babel-plugin-styled-components-require","owner":"siddharthkp","description":"Babel plugin that adds styled-components import declaration","archived":false,"fork":false,"pushed_at":"2017-08-16T19:57:08.000Z","size":9,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-11T02:32:43.546Z","etag":null,"topics":["babel","babel-plugin","react","require","styled-components"],"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/siddharthkp.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-03T15:02:28.000Z","updated_at":"2020-05-18T15:33:30.000Z","dependencies_parsed_at":"2023-04-18T07:46:54.310Z","dependency_job_id":null,"html_url":"https://github.com/siddharthkp/babel-plugin-styled-components-require","commit_stats":{"total_commits":17,"total_committers":2,"mean_commits":8.5,"dds":"0.11764705882352944","last_synced_commit":"ad2df194713d07a6c7edffd6e279d52dc14aa5be"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siddharthkp%2Fbabel-plugin-styled-components-require","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siddharthkp%2Fbabel-plugin-styled-components-require/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siddharthkp%2Fbabel-plugin-styled-components-require/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siddharthkp%2Fbabel-plugin-styled-components-require/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siddharthkp","download_url":"https://codeload.github.com/siddharthkp/babel-plugin-styled-components-require/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232296903,"owners_count":18501331,"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","babel-plugin","react","require","styled-components"],"created_at":"2024-10-11T05:50:42.927Z","updated_at":"2025-01-03T05:47:01.302Z","avatar_url":"https://github.com/siddharthkp.png","language":"JavaScript","readme":"### babel-plugin-styled-components-require\n[![Build\nStatus](https://api.travis-ci.org/siddharthkp/babel-plugin-styled-components-require.svg?branch=master)](https://travis-ci.org/siddharthkp/babel-plugin-styled-components-require)\n[![npm](https://img.shields.io/npm/v/babel-plugin-styled-components-require.svg?maxAge=3600)](https://www.npmjs.com/package/babel-plugin-styled-components-require)\n\n\u0026nbsp;\n\nBabel plugin that adds styled-components import declaration.\n\n\u0026nbsp;\n\n#### Example\n\nYour `component.js` that contains this code:\n\n```js\nconst Card = styled.div`\n  background: #FFF;\n  border: 1px solid #DDD;\n  border-radius: 2px;\n  padding: 10px;\n`;\nexport default Card;\n```\n\nwill be transpiled to:\n\n```js\nimport styled from 'styled-components';\n\nconst Card = styled.div`\n  background: #FFF;\n  border: 1px solid #DDD;\n  border-radius: 2px;\n  padding: 10px;\n`;\nexport default Card;\n```\n\n\u0026nbsp;\n\n#### Usage\n\n`npm install babel-plugin-styled-components-require --save-dev`\n\nAdd `styled-components-require` into `.babelrc`\n\n```json\n{\n  \"plugins\": [\n    \"styled-components-require\"\n  ]\n}\n```\n\n\u0026nbsp;\n\n#### Tests\n\n✓ add import statement if `styled.*` is present\n\n✓ do not add to already transpiled code\n\n✓ do not add import styled-components twice\n\n✓ do not add if it already imported\n\n\u0026nbsp;\n\n#### You like?\n\n:star: this repo\n\n\u0026nbsp;\n\n#### License\n\nMIT © [siddharthkp](https://github.com/siddharthkp)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiddharthkp%2Fbabel-plugin-styled-components-require","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiddharthkp%2Fbabel-plugin-styled-components-require","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiddharthkp%2Fbabel-plugin-styled-components-require/lists"}