You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code mutations in schematics were never easier than now.
6
+
Code mutations were never easier than now.
6
7
7
8
```
8
9
npm i --save-dev ng-morph
@@ -12,10 +13,13 @@ You also need `@angular-devkit/core` and `@angular-devkit/schematics` to be inst
12
13
13
14
## What is it?
14
15
15
-
It is a large set of tools that speeds up your work with Angular schematics. It has [ts-morph](https://ts-morph.com/) under the hood and allows you to manipulate with safe TypeScript AST.
16
+
It is a large set of tools for both global code base
17
+
updates in your project and speeding up your work on Angular schematics. It has [ts-morph](https://ts-morph.com/) under the hood and allows you to manipulate with safe TypeScript AST.
16
18
17
19
## Why is it better than default schematics?
18
20
21
+
🦅 You can quickly write migrations for your own project and run it as a simple script
22
+
19
23
🛠 There are many tools made for working with Angular. You can easily find and manipulate TS and Ng entities.
20
24
21
25
✅ You work with an abstract tree and it can be replaced,
@@ -24,7 +28,46 @@ So, you can test your schematics rapidly fast.
24
28
25
29
## How to start
26
30
27
-
Install the package and visit our [documentation](https://tinkoff.github.io/ng-morph/)
31
+
Install the package and visit our [documentation](https://tinkoff.github.io/ng-morph)
32
+
33
+
For example, this is how `ng-morph` setup looks for migrating your own project:
34
+
35
+
```typescript
36
+
import {
37
+
setActiveProject,
38
+
createProject,
39
+
getImports,
40
+
NgMorphTree,
41
+
} from'ng-morph';
42
+
43
+
/**
44
+
* set all ng-morph functions to work with the all TS and JSON files
You can check it out on [Stackblitz playground](https://stackblitz.com/edit/ts-angular-13-web-container-starter-nzd2ew?file=ng-morph-scripts%2Fscript.ts,src%2Fapp%2Fapp.component.ts)
28
71
29
72
## Core team
30
73
@@ -46,19 +89,19 @@ Install the package and visit our [documentation](https://tinkoff.github.io/ng-m
0 commit comments