@@ -136,17 +136,18 @@ export class HammerGesturesRule extends MigrationRule<null> {
136
136
137
137
/*
138
138
Possible scenarios and how the migration should change the project:
139
- 1. We detect that a custom HammerJS gesture config set up:
139
+ 1. We detect that a custom HammerJS gesture config is set up:
140
140
- Remove references to the Material gesture config if no event from the
141
141
Angular Material gesture config is used.
142
- - Print a warning about ambiguous setup that cannot be handled completely.
143
- 2. We detect that HammerJS is *only* used at runtime:
142
+ - Print a warning about ambiguous configuration that cannot be handled completely
143
+ if there are references to the Material gesture config.
144
+ 2. We detect that HammerJS is only used programmatically:
144
145
- Remove references to GestureConfig of Material.
145
146
- Remove references to the "HammerModule" if present.
146
147
3. We detect that HammerJS is used in a template:
147
148
- Copy the Material gesture config into the app.
148
149
- Rewrite all gesture config references to the newly copied one.
149
- - Setup the new gesture config in the root app module.
150
+ - Set up the new gesture config in the root app module.
150
151
4. We detect no HammerJS usage at all:
151
152
- Remove Hammer imports
152
153
- Remove Material gesture config references
@@ -163,7 +164,7 @@ export class HammerGesturesRule extends MigrationRule<null> {
163
164
// since events provided by the Material gesture config are guaranteed to be unused.
164
165
this . _removeMaterialGestureConfigSetup ( ) ;
165
166
this . printInfo (
166
- 'The HammerJS v9 migration for Angular components detected that HammerJS is ' +
167
+ 'The HammerJS v9 migration for Angular Components detected that HammerJS is ' +
167
168
'manually set up in combination with references to the Angular Material gesture ' +
168
169
'config. This target cannot be migrated completely, but all references to the ' +
169
170
'deprecated Angular Material gesture have been removed.' ) ;
@@ -173,7 +174,7 @@ export class HammerGesturesRule extends MigrationRule<null> {
173
174
// automatically remove references. This is because we do *not* know whether the
174
175
// event is actually provided by the custom config or by the Material config.
175
176
this . printInfo (
176
- 'The HammerJS v9 migration for Angular components detected that HammerJS is ' +
177
+ 'The HammerJS v9 migration for Angular Components detected that HammerJS is ' +
177
178
'manually set up in combination with references to the Angular Material gesture ' +
178
179
'config. This target cannot be migrated completely. Please manually remove references ' +
179
180
'to the deprecated Angular Material gesture config.' ) ;
@@ -212,7 +213,7 @@ export class HammerGesturesRule extends MigrationRule<null> {
212
213
// and we want to print a message that developers might be able to remove Hammer manually.
213
214
if ( ! hasCustomGestureConfigSetup && ! this . _usedInRuntime && this . _usedInTemplate ) {
214
215
this . printInfo (
215
- 'The HammerJS v9 migration for Angular components migrated the ' +
216
+ 'The HammerJS v9 migration for Angular Components migrated the ' +
216
217
'project to keep HammerJS installed, but detected ambiguous usage of HammerJS. Please ' +
217
218
'manually check if you can remove HammerJS from your application.' ) ;
218
219
}
@@ -792,7 +793,7 @@ export class HammerGesturesRule extends MigrationRule<null> {
792
793
static globalPostMigration ( tree : Tree , context : SchematicContext ) : PostMigrationAction {
793
794
// Always notify the developer that the Hammer v9 migration does not migrate tests.
794
795
context . logger . info ( chalk . yellow (
795
- '\n⚠ General notice: The HammerJS v9 migration for Angular components is not able to ' +
796
+ '\n⚠ General notice: The HammerJS v9 migration for Angular Components is not able to ' +
796
797
'migrate tests. Please manually clean up tests in your project if they rely on ' +
797
798
( this . globalUsesHammer ? 'the deprecated Angular Material gesture config.' : 'HammerJS.' ) ) ) ;
798
799
0 commit comments