https://github.com/mgechev/ngmigrate
Automated migration of <template> to <ng-template> for Angular 4+
https://github.com/mgechev/ngmigrate
angular automated migration
Last synced: 8 months ago
JSON representation
Automated migration of <template> to <ng-template> for Angular 4+
- Host: GitHub
- URL: https://github.com/mgechev/ngmigrate
- Owner: mgechev
- Created: 2017-03-31T20:03:09.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-02T20:56:24.000Z (almost 9 years ago)
- Last Synced: 2025-05-05T20:12:15.799Z (8 months ago)
- Topics: angular, automated, migration
- Language: JavaScript
- Homepage:
- Size: 22.7 MB
- Stars: 20
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Automated Migration
Tool for automatic migration of Angular applications.
`ngmigrate` is PoC, so it implements a single migration strategy - `` elements to ``.

### Context-aware automated migration of `` to ``.
This tool will automatically migrate your templates from the deprecated `` element to the new `` introduced by Angular 4.
The replacement is context-aware, which means that it will consider the semantics of your code; this makes it better than simple "Search/Replace" with `sed` or other similar tools.
Under the hood the tool parses your code with the Angular Compiler, [codelyzer](https://github.com/mgechev/codelyzer) and [tslint](https://github.com/palantir/tslint). Once the code is properly analyzed, it goes through a process of migration which replaces all occurrences of `` with ``.
# Warning
**Do not perform the migration on code which is not under version control!**
Although the tool is well tested, glitches are possible. In order to not loose information, perform the migration under version control and check the diff once done.
# How to use it?
```
$ npm i -g ngmigrate
$ ngmigrate [PATH_TO_YOUR_FILES]
```
# License
MIT