Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
ijlee2 committed Apr 23, 2024
1 parent b41c87d commit a0a8a94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ _Codemod to remove `inject as service`_<sup>1</sup>
1. [Contributing](#contributing)
1. [License](#license)

<sup>1. `@ember/service` has provided `service` since [Ember 4.1](https://blog.emberjs.com/ember-4-1-released/). `inject`, which became an alias to `service`, is [planned to be deprecated in v6](https://rfcs.emberjs.com/id/1001-deprecate-named-inject).</sup>
<sup>1. `@ember/service` provides `service` since [Ember 4.1](https://blog.emberjs.com/ember-4-1-released/). `inject`, which became an alias to `service`, is [planned to be deprecated in v6](https://rfcs.emberjs.com/id/1001-deprecate-named-inject).</sup>


## Features
Expand Down Expand Up @@ -41,12 +41,12 @@ npx ember-codemod-remove-inject-as-service <arguments>

Step 2. Fix formatting issues.

- Optional: Do a find-and-replace-all, if you want to place `@service()` and `declare` on the same line when possible.
- Optional: Do a find-and-replace-all in TS files, if you want to place `@service()` and `declare` on the same line when possible.

- Find: `@service\((.+)\)(\n|\s)+declare`
- Replace: `@service($1) declare`

- Optional: Do a find-and-replace-all, if you want to place `@service` and `declare` on the same line when possible.
- Optional: Do a find-and-replace-all in TS files, if you want to place `@service` and `declare` on the same line when possible.

- Find: `@service(\n|\s)+declare`
- Replace: `@service declare`
Expand Down

0 comments on commit a0a8a94

Please sign in to comment.