A comprehensive toolkit for performing safe TypeScript AST mutations and accelerating Angular schematic development.
ng-morph is a toolkit for performing safe, large-scale code mutations in TypeScript projects and accelerating Angular schematic development. It provides an abstraction over TypeScript's AST using ts-morph, allowing developers to write scripts that refactor codebases or create custom Angular migrations with ease. The library solves the problem of tedious and error-prone manual code updates by offering a programmatic, testable approach to code transformations.
Angular developers and teams who need to perform project-wide refactoring, create custom schematics for their libraries, or automate code migrations in large TypeScript codebases.
Developers choose ng-morph because it significantly reduces the complexity of working with TypeScript AST, provides Angular-specific utilities out of the box, and enables fast testing through virtual project trees. It offers a more intuitive and productive alternative to raw schematics APIs or manual refactoring.
Code mutations in your project or schematics were never easier than now.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Includes specialized tools for finding and manipulating Angular entities like components and modules, streamlining schematic creation and reducing boilerplate code.
Leverages ts-morph under the hood to provide a reliable TypeScript AST interface, minimizing syntax errors during large-scale code mutations.
Enables rapid, isolated testing of schematics by replacing the file system with a virtual tree, as highlighted in the README for fast development cycles.
Offers intuitive functions like getImports and editImports for common transformations, reducing the complexity of writing migration scripts.
Heavily optimized for Angular, making it less versatile for general TypeScript projects that don't use Angular frameworks, limiting broader applicability.
Requires @angular-devkit/core and @angular-devkit/schematics to be installed alongside ng-morph, adding setup complexity and potential dependency conflicts.
The README directs users to external documentation for detailed guidance, which if not comprehensive or up-to-date, could hinder onboarding and usage.