{"id":13808110,"url":"https://github.com/taiga-family/ng-morph","last_synced_at":"2025-05-15T14:08:35.550Z","repository":{"id":38424886,"uuid":"359820543","full_name":"taiga-family/ng-morph","owner":"taiga-family","description":"Code mutations in your project or schematics were never easier than now.","archived":false,"fork":false,"pushed_at":"2025-05-12T07:43:55.000Z","size":67683,"stargazers_count":158,"open_issues_count":9,"forks_count":7,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-12T08:55:41.809Z","etag":null,"topics":["angular","ast","hacktoberfest","mutations","schematics","ts-morph","typescript"],"latest_commit_sha":null,"homepage":"https://taiga-family.github.io/ng-morph","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taiga-family.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-20T13:11:39.000Z","updated_at":"2025-03-27T13:06:55.000Z","dependencies_parsed_at":"2024-03-04T18:17:14.294Z","dependency_job_id":"a678781f-1b9a-47c0-85bd-baa52ec8b82e","html_url":"https://github.com/taiga-family/ng-morph","commit_stats":{"total_commits":881,"total_committers":15,"mean_commits":"58.733333333333334","dds":"0.22133938706015888","last_synced_commit":"cb090a9beb7feb772bc085323b3cb8637beff8cf"},"previous_names":["tinkoffcreditsystems/ng-morph","taiga-family/ng-morph","tinkoff/ng-morph"],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taiga-family%2Fng-morph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taiga-family%2Fng-morph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taiga-family%2Fng-morph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taiga-family%2Fng-morph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taiga-family","download_url":"https://codeload.github.com/taiga-family/ng-morph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254355335,"owners_count":22057354,"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":["angular","ast","hacktoberfest","mutations","schematics","ts-morph","typescript"],"created_at":"2024-08-04T01:01:35.260Z","updated_at":"2025-05-15T14:08:30.525Z","avatar_url":"https://github.com/taiga-family.png","language":"TypeScript","funding_links":[],"categories":["Angular"],"sub_categories":["Updating Angular"],"readme":"# \u003cimg src=\"apps/demo/src/assets/images/ng-morph.png\" alt=\"logo\" width=\"48px\"\u003e ng-morph\n\n[![npm version](https://img.shields.io/npm/v/ng-morph.svg)](https://npmjs.com/package/ng-morph)\n[![downloads](https://img.shields.io/npm/dy/ng-morph?color=dark-green)](https://npmjs.com/package/ng-morph)\n[![telegram chat](https://img.shields.io/badge/support-Contact%20us-blue)](https://t.me/taiga_ui)\n\nCode mutations were never easier than now.\n\n```\nnpm i --save-dev ng-morph\n```\n\nYou also need `@angular-devkit/core` and `@angular-devkit/schematics` to be installed.\n\n## What is it?\n\nIt is a large set of tools for both global code base updates in your project and speeding up your work on Angular\nschematics. It has [ts-morph](https://ts-morph.com/) under the hood and allows you to manipulate with safe TypeScript\nAST.\n\n## Why is it better than default schematics?\n\n🦅 You can quickly write migrations for your own project and run it as a simple script\n\n🛠 There are many tools made for working with Angular. You can easily find and manipulate TS and Ng entities.\n\n✅ You work with an abstract tree and it can be replaced, for example, with virtual tree for testing instead of real\nfile system. So, you can test your schematics rapidly fast.\n\n## How to start\n\nInstall the package and visit our [documentation](https://taiga-family.github.io/ng-morph)\n\nFor example, this is how `ng-morph` setup looks for migrating your own project:\n\n```typescript\nimport {setActiveProject, createProject, getImports, NgMorphTree} from 'ng-morph';\n\n/**\n * set all ng-morph functions to work with the all TS and JSON files\n * of the current project\n * */\nsetActiveProject(createProject(new NgMorphTree(), '/', ['**/*.ts', '**/*.json']));\n\n/**\n * This simple migration gets all imports from the project TS files and\n * replaces 'old' substring with 'new'\n * */\nconst imports = getImports('some/path/**.ts', {\n  moduleSpecifier: '@morph-old*',\n});\n\neditImports(imports, (importEntity) =\u003e ({\n  moduleSpecifier: importEntity.moduleSpecifier.replace('old', 'new'),\n}));\n\n/**\n * All changes are made in a virtual project.\n * You can save them when it is time\n * */\nsaveActiveProject();\n```\n\nYou can check it out on\n[Stackblitz playground](https://stackblitz.com/edit/ts-angular-13-web-container-starter-nzd2ew?file=ng-morph-scripts%2Fscript.ts,src%2Fapp%2Fapp.component.ts)\n\n## Dive into More Examples 🌟🔍\n\n- [Add readonly for unchanged 📜🔒](https://stackblitz.com/edit/ts-angular-13-web-container-starter-55t636?file=ng-morph-scripts%2Fscript.ts)\n- [Upgrade constructor DI to inject 🛠️🎩](https://stackblitz.com/edit/ts-angular-13-web-container-starter-ozrudz?file=ng-morph-scripts%2Fscript.ts)\n- [Remove unused deps 🧹❌](https://stackblitz.com/edit/ts-angular-13-web-container-starter-d4rb9b?file=ng-morph-scripts%2Fscript.ts)\n- [Prefix for selector 🏷️✨](https://stackblitz.com/edit/ts-angular-13-web-container-starter-9dawcd?file=ng-morph-scripts%2Fscript.ts)\n\nFor more examples visit [this stackblitz collection](https://stackblitz.com/@MarsiBarsi/collections/ng-morph-examples)\n\n## Core team\n\n\u003ctable\u003e\n    \u003ctr\u003e\n       \u003ctd align=\"center\"\u003e\n            \u003ca href=\"https://twitter.com/katsuba_igor\"\n                \u003e\u003cimg\n                    src=\"https://github.com/IKatsuba.png?size=100\"\n                    width=\"100\"\n                    style=\"margin-bottom: -4px; border-radius: 8px;\"\n                    alt=\"Igor Katsuba\"\n                /\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eIgor Katsuba\u003c/b\u003e\u003c/sub\u003e\u003c/a\n            \u003e\n            \u003cdiv style=\"margin-top: 4px\"\u003e\n                \u003ca\n                    href=\"https://twitter.com/katsuba_igor\"\n                    title=\"Twitter\"\n                    \u003e\u003cimg\n                        style=\"width: 16px;\"\n                        width=\"16\"\n                        src=\"https://raw.githubusercontent.com/MarsiBarsi/readme-icons/main/twitter.svg\"\n                /\u003e\u003c/a\u003e\n                \u003ca href=\"https://github.com/IKatsuba\" title=\"Github\"\n                    \u003e\u003cimg\n                        width=\"16\"\n                        src=\"https://raw.githubusercontent.com/MarsiBarsi/readme-icons/main/github.svg\"\n                /\u003e\u003c/a\u003e\n                \u003ca\n                    href=\"https://t.me/Katsuba\"\n                    title=\"Telegram\"\n                    \u003e\u003cimg\n                        width=\"16\"\n                        src=\"https://raw.githubusercontent.com/MarsiBarsi/readme-icons/main/send.svg\"\n                /\u003e\u003c/a\u003e\n            \u003c/div\u003e\n        \u003c/td\u003e\n        \u003ctd align=\"center\"\u003e\n            \u003ca href=\"http://marsibarsi.me\"\n                \u003e\u003cimg\n                    src=\"https://github.com/marsibarsi.png?size=100\"\n                    width=\"100\"\n                    style=\"margin-bottom: -4px; border-radius: 8px;\"\n                    alt=\"Roman Sedov\"\n                /\u003e\u003cbr /\u003e\u003cb\u003eRoman Sedov\u003c/b\u003e\u003c/a\n            \u003e\n            \u003cdiv style=\"margin-top: 4px\"\u003e\n                \u003ca\n                    href=\"https://twitter.com/marsibarsi\"\n                    title=\"Twitter\"\n                    \u003e\u003cimg\n                        width=\"16\"\n                        src=\"https://raw.githubusercontent.com/MarsiBarsi/readme-icons/main/twitter.svg\"\n                /\u003e\u003c/a\u003e\n                \u003ca\n                    href=\"https://github.com/marsibarsi\"\n                    title=\"GitHub\"\n                    \u003e\u003cimg\n                        width=\"16\"\n                        src=\"https://raw.githubusercontent.com/MarsiBarsi/readme-icons/main/github.svg\"\n                /\u003e\u003c/a\u003e\n                \u003ca\n                    href=\"https://t.me/marsibarsi\"\n                    title=\"Telegram\"\n                    \u003e\u003cimg\n                        width=\"16\"\n                        src=\"https://raw.githubusercontent.com/MarsiBarsi/readme-icons/main/send.svg\"\n                /\u003e\u003c/a\u003e\n            \u003c/div\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\n\u003c/table\u003e\n\nng-morph is a part of [Taiga UI](https://github.com/taiga-family/taiga-ui) libraries family which is backed and used by\na large enterprise. This means you can rely on timely support and continuous development.\n\n## License\n\n🆓 Feel free to use our library in your commercial and private applications\n\nAll ng-morph packages are covered by [Apache 2.0](/LICENSE)\n\nRead more about this license [here](https://choosealicense.com/licenses/apache-2.0/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaiga-family%2Fng-morph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaiga-family%2Fng-morph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaiga-family%2Fng-morph/lists"}