{"id":13532625,"url":"https://github.com/EDITD/codemods","last_synced_at":"2025-04-01T21:30:48.170Z","repository":{"id":149031382,"uuid":"91366042","full_name":"EDITD/codemods","owner":"EDITD","description":"Code for changing your code","archived":true,"fork":false,"pushed_at":"2018-11-08T17:10:48.000Z","size":52,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":30,"default_branch":"master","last_synced_at":"2024-11-02T19:34:17.865Z","etag":null,"topics":[],"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/EDITD.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":"2017-05-15T17:35:22.000Z","updated_at":"2023-11-16T16:00:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"e0ef8c97-fc0c-4f04-b3c2-990d98360fcf","html_url":"https://github.com/EDITD/codemods","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EDITD%2Fcodemods","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EDITD%2Fcodemods/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EDITD%2Fcodemods/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EDITD%2Fcodemods/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EDITD","download_url":"https://codeload.github.com/EDITD/codemods/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246712938,"owners_count":20821819,"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":[],"created_at":"2024-08-01T07:01:12.415Z","updated_at":"2025-04-01T21:30:47.882Z","avatar_url":"https://github.com/EDITD.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"## EDITED codemods\n\nThis repository contains a codemod script for converting React codebases from Radium to glamor automatically. Eventually this will become a place for all sorts of JS migrations, but there's just one for now.\n\n### Setup \u0026 Run\n\n  * `npm install -g jscodeshift`\n  * `git clone https://github.com/EDITD/codemods.git` or download a zip file\n    from `https://github.com/EDITD/codemods/archive/master.zip`\n  * Run `npm install` or `yarn` in the codemods directory\n  * `jscodeshift -t \u003ccodemod-script\u003e \u003cpath\u003e`\n  * Use the `-d` option for a dry-run and use `-p` to print the output\n    for comparison\n\n### Included Scripts\n\n#### `radium-to-glamor`\n\nThis does a few things in order to move a codebase from Radium to glamor completely.\n\n* Removes all `Radium` imports and calls\n* Converts `style={someStyles}` to `{...css(someStyles)}` in JSX when the components are DOM components from React. Props to any other components are left as they are. If it's not possible to statically analyse whether the expression should be spread and passed into `css` then we add comments leading with `TODO_RADIUM_TO_GLAMOR`.\n* Adds `import { css } from \"glamor\"` to all files that need it\n\n### Recast Options\n\nOptions to [recast](https://github.com/benjamn/recast)'s printer can be provided\nthrough the `printOptions` command line argument\n\n```sh\njscodeshift -t transform.js \u003cpath\u003e --printOptions='{\"quote\":\"double\"}'\n```\n\n### Support and Contributing\n\nPlease feel free to make a Pull Request with any improvements!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEDITD%2Fcodemods","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEDITD%2Fcodemods","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEDITD%2Fcodemods/lists"}