{"id":17274598,"url":"https://github.com/rip21/ramda-codemod","last_synced_at":"2025-03-26T13:41:40.995Z","repository":{"id":65371893,"uuid":"113983045","full_name":"RIP21/ramda-codemod","owner":"RIP21","description":"Simple codemod that adds import to ramda to all js/jsx files with R global variable.","archived":false,"fork":false,"pushed_at":"2017-12-12T13:13:32.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-01T10:06:53.643Z","etag":null,"topics":["codemod","global","jscodeshift","ramda","ramdajs"],"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/RIP21.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}},"created_at":"2017-12-12T11:38:23.000Z","updated_at":"2017-12-26T17:06:39.000Z","dependencies_parsed_at":"2023-01-20T01:32:12.462Z","dependency_job_id":null,"html_url":"https://github.com/RIP21/ramda-codemod","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/RIP21%2Framda-codemod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RIP21%2Framda-codemod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RIP21%2Framda-codemod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RIP21%2Framda-codemod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RIP21","download_url":"https://codeload.github.com/RIP21/ramda-codemod/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245666159,"owners_count":20652726,"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":["codemod","global","jscodeshift","ramda","ramdajs"],"created_at":"2024-10-15T08:54:17.621Z","updated_at":"2025-03-26T13:41:40.978Z","avatar_url":"https://github.com/RIP21.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ramda-codemod 🛠\n\nIt's a simple codemod to add explicit import for `ramda` for files which are using \nit as `R` global variable.\n\n## Why?\n`ProvidePlugin` for `Webpack` for globals such as `R` for global `ramda` import doesn't work properly with `babel-plugin-ramda` \nso to fix it you need a lot of manual work. This codemod here to do it automate it for you.\n\n## Input/Output\n```javascript\nR.map();\n```\n\n```javascript\nimport R from 'ramda';\nR.map();\n```\n\n## Usage\n1. Install jscodeshift`npm i -g jscodeshift`\n2. Download `R-globals-add-explicit-import.js` from this repo or download it like \n`npm i ramda-codemod` and take it from `node_modules/ramda-codemod/R-globals-add-explicit-import.js`\n3. In root of the project with sources under `/src` for example call\n`jscodemode -t \u003cpath-to-codemod\u003e/R-globals-add-explicit-import.js ./src --noSemi=true`\n4. PROFIT!\n\n## Run Options\n* `noSemi` - removes `;` from the import statement :)\n* `useDouble` - wraps with `\"` instead of `'` so `import R from \"ramda\";`\n* `useRequire` - instead of ES6 imports uses require() function.\n\n## IT DOESN'T WORK!!!\nIf you use some other global variable which is differentiate from `R` then, I'm sorry, it will not work :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frip21%2Framda-codemod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frip21%2Framda-codemod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frip21%2Framda-codemod/lists"}