{"id":21518284,"url":"https://github.com/baopham/jscodemod-collection","last_synced_at":"2026-05-11T16:37:24.380Z","repository":{"id":138004548,"uuid":"86920449","full_name":"baopham/jscodemod-collection","owner":"baopham","description":"A collection of JSCodemods","archived":false,"fork":false,"pushed_at":"2017-04-06T14:59:09.000Z","size":77,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T16:50:53.500Z","etag":null,"topics":["angular","es6","jscodemod","jscodeshift"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baopham.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-01T14:53:13.000Z","updated_at":"2017-05-05T05:07:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"776c8622-abe3-41af-ab0c-9e5b741c33c2","html_url":"https://github.com/baopham/jscodemod-collection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/baopham/jscodemod-collection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baopham%2Fjscodemod-collection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baopham%2Fjscodemod-collection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baopham%2Fjscodemod-collection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baopham%2Fjscodemod-collection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baopham","download_url":"https://codeload.github.com/baopham/jscodemod-collection/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baopham%2Fjscodemod-collection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32903673,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["angular","es6","jscodemod","jscodeshift"],"created_at":"2024-11-24T00:51:16.033Z","updated_at":"2026-05-11T16:37:24.362Z","avatar_url":"https://github.com/baopham.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"JSCodemod Collection\n==========\n\n[![CircleCI](https://circleci.com/gh/baopham/jscodemod-collection.svg?style=svg)](https://circleci.com/gh/baopham/jscodemod-collection)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/) \n\nA collection of JSCodemods\n\n\nUsage:\n------\n\n### Convert Angular injected dependencies to ES6 import\n\n\u003e Note: you will need to pass in the path to a config script for generating the import statements.\n\u003e See [config.example.js](./transformers/config.example.js)\n\n```bash\ncd transformers\njscodeshift -t ./angular-injected-dep-to-es6-import.js /path/to/your-angular-file.js --config='/absolute/path/to/config.example.js'\n```\n\nExample:  \n\n* Input:\n\n```js\n'use strict';\n\nangular.module('angularApp')\n  .factory('helloWorld', helloWorld);\n\nfunction helloWorld($http, $q, helloWorldConstant) {\n\n}\n```\n\n* Output:\n\n```js\n'use strict';\n\nimport { $http, $q } from '../../angularDeps';\nimport helloWorldConstant from '../../helloWorld.constant';\n\nangular.module('angularApp')\n  .factory('helloWorld', helloWorld);\n\nfunction helloWorld() {\n\n}\n```\n\n\n### A helper to collect all the Angular services, factories, constants etc. including their file paths\n\n```bash\ncd /path/to/angular-project\njscodeshift -s -t /path/to/jscodemod-collection/transformers/angular-collect.js --ignore-config=.gitignore ./client\n```\n\nWill output\n\n```JSON\n\"helloWorldConstant\": \"path/to/helloWorld.constant.js\",\n\"helloWorldService\": \"path/to/helloWorld.service.js\",\n```\n\nYou can then copy the output to a JSON file that can be used for later. See [config.example.js](./transformers/config.example.js)\n\n\nRequirements:\n-------------\nNode ^6\n\nInstall:\n--------\n\n```bash\ngit clone git@github.com:baopham/jscodemod-collection.git\nyarn install\nyarn install jscodeshift -g\n```\n\nLicense:\n--------\nMIT\n\nAuthor:\n-------\nBao Pham\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaopham%2Fjscodemod-collection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaopham%2Fjscodemod-collection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaopham%2Fjscodemod-collection/lists"}