{"id":18941353,"url":"https://github.com/jmurzy/babel-plugin-transform-styles","last_synced_at":"2026-03-10T00:33:15.987Z","repository":{"id":140040618,"uuid":"55194500","full_name":"jmurzy/babel-plugin-transform-styles","owner":"jmurzy","description":"Auto-generates React StyleSheets from import statements of CSS files 💃🏻","archived":false,"fork":false,"pushed_at":"2016-10-20T21:13:41.000Z","size":97,"stargazers_count":24,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-09T02:20:58.177Z","etag":null,"topics":["babel","react-native"],"latest_commit_sha":null,"homepage":"","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/jmurzy.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-01T01:26:29.000Z","updated_at":"2021-04-29T08:21:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"917f5878-6420-4a86-9614-1d5c6afac49c","html_url":"https://github.com/jmurzy/babel-plugin-transform-styles","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/jmurzy/babel-plugin-transform-styles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmurzy%2Fbabel-plugin-transform-styles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmurzy%2Fbabel-plugin-transform-styles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmurzy%2Fbabel-plugin-transform-styles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmurzy%2Fbabel-plugin-transform-styles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmurzy","download_url":"https://codeload.github.com/jmurzy/babel-plugin-transform-styles/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmurzy%2Fbabel-plugin-transform-styles/sbom","scorecard":{"id":524905,"data":{"date":"2025-08-11","repo":{"name":"github.com/jmurzy/babel-plugin-transform-styles","commit":"a94102b353003f8bb8ba82f7276cad51e051ba50"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/11 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: examples/Vanilla/android/gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T04:05:54.289Z","repository_id":140040618,"created_at":"2025-08-20T04:05:54.289Z","updated_at":"2025-08-20T04:05:54.289Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30318464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["babel","react-native"],"created_at":"2024-11-08T12:27:41.156Z","updated_at":"2026-03-10T00:33:15.969Z","avatar_url":"https://github.com/jmurzy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# babel-plugin-transform-styles\n\nThis [Babel](https://github.com/babel/babel) [transoformation](https://babeljs.io/docs/plugins/) auto-generates React [StyleSheet](https://facebook.github.io/react-native/docs/stylesheet.html)s from import statements of CSS files at compile time.\n\n[![CircleCI](https://img.shields.io/circleci/project/jmurzy/babel-plugin-transform-styles.svg)](https://circleci.com/gh/jmurzy/babel-plugin-transform-styles)\n[![npm version](https://img.shields.io/npm/v/babel-plugin-transform-styles.svg?style=flat-square)](https://www.npmjs.com/package/babel-plugin-transform-styles)\n[![npm](https://img.shields.io/npm/l/babel-plugin-transform-styles.svg)](https://github.com/jmurzy/babel-plugin-transform-styles/blob/master/LICENSE.md)\n\n## Example\n\nOnce you clone the repo, you should be able to run the [example project](https://github.com/jmurzy/babel-plugin-transform-styles/tree/master/examples/Vanilla) as below.\n\n```shell\n- cd examples/Vanilla\n- npm install\n- npm run simulator\n```\n\nFor example, given the following CSS file\n\n```css\n.container {\n  flex: 1;\n  justify-content: center;\n  align-items: center;\n  background-color: #F5FCFF;\n  margin: 10 5;\n  border-bottom-width: hairline-width;\n  -ios-shadow-opacity: 4;\n  -ios-shadow-offset: 2 4;\n  -android-elevation: 1;\n}\n```\n\nwhen imported as follows\n\n```js\nimport styles from '../styles.css';\n\n\u003cContainer style={styles.container} /\u003e\n\n```\n\nwill be transformed to\n\n```js\nvar styles = StyleSheet.create({\n  \"container\": {\n    \"flex\": 1,\n    \"justifyContent\": \"center\",\n    \"alignItems\": \"center\",\n    \"backgroundColor\": \"#F5FCFF\",\n    \"margin\": 0,\n    \"marginTop\": 10,\n    \"marginRight\": 5,\n    \"marginBottom\": 10,\n    \"marginLeft\": 5,\n    \"borderBottomWidth\": StyleSheet.hairlineWidth,\n    \"shadowOpacity\": 4,\n    \"shadowOffset\": {\n      \"width\": 2,\n      \"height\": 4\n    },\n    \"elevation\": 1\n  }\n});\n```\n\nSee the spec for [more examples](https://github.com/jmurzy/babel-plugin-transform-styles/blob/master/test/index.spec.js).\n\n## Requirements\n[Babel](https://github.com/babel/babel) v6 or higher.\n\n## Installation\n\n```sh\n$ npm install babel-plugin-transform-styles\n```\n\n## Usage\n\n### Via `.babelrc`\n\n**.babelrc**\n\n```json\n{\n  \"plugins\": [[\"transform-styles\", {\n                \"extensions\": [\"css\"],\n              }]]\n}\n```\n\n### Via Node API\n\n```javascript\nrequire('babel-core').transform('code', {\n  plugins: [['transform-styles', {\n              extensions: ['css'],\n            }]]\n});\n```\n\n### Contributing\n\nContributions are very welcome—bug fixes, features, documentation, tests. Just make sure the tests are passing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmurzy%2Fbabel-plugin-transform-styles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmurzy%2Fbabel-plugin-transform-styles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmurzy%2Fbabel-plugin-transform-styles/lists"}