Skip to content

Commit

Permalink
refactor: testing new readme format
Browse files Browse the repository at this point in the history
  • Loading branch information
gp-pereira committed Nov 24, 2024
1 parent 1d2ef10 commit 4d237af
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/vscode_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,6 @@ jobs:
with:
packagePath: extensions/vscode
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
registryUrl: https://marketplace.visualstudio.com
baseContentUrl: https://github.com/gp-pereira/refactorex/blob/main/
baseImagesUrl: https://github.com/gp-pereira/refactorex/blob/main/
85 changes: 80 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ enhance VS Code with code actions to quickly refactor Elixir.

| Scope | Refactoring | Target | Published? |
| :-: | - | :-: | :-: |
| `alias` | Expand aliases | selection ||
| `alias` | Extract alias | selection ||
| `alias` | Inline alias | selection ||
| `alias` | Merge aliases | selection ||
| `alias` | Sort nested aliases | line ||
| `alias` | [Expand aliases](#alias-expand-aliases) | selection ||
| `alias` | [Extract alias](#alias-extract-alias) | selection ||
| `alias` | [Inline alias](#alias-inline-alias) | selection ||
| `alias` | [Merge aliases](#alias-merge-aliases) | selection ||
| `alias` | [Sort nested aliases](#alias-sort-nested-aliases) | line ||
| | | |
| `constant` | [Extract constant](#variable-extract-constant) | selection ||
| `constant` | Inline constant | selection ||
Expand Down Expand Up @@ -47,6 +47,81 @@ enhance VS Code with code actions to quickly refactor Elixir.

## How to use each refactoring

### Alias: expand aliases

| | |
|-|-|
| Description | Expand nested aliases to their full names |
| Target | Selection of single nested alias, block of nested aliases or whole alias |
| Inverse of | [Merge aliases](#alias-merge-aliases) |
| Notes | - |

![Example](assets/examples/alias/expand_aliases.gif)

[▲ top](#available-refactorings)

<br>

### Alias: extract alias

| | |
|-|-|
| Description | Extract the module full name to an alias and use it |
| Target | Selection of module full name |
| Inverse of | [Inline alias](#alias-inline-alias) |
| Notes | - |

![Example](assets/examples/alias/extract_alias.gif)

[▲ top](#available-refactorings)

<br>

### Alias: inline alias

| | |
|-|-|
| Description | Replace the aliased name by its full name |
| Target | Selection of aliased name |
| Inverse of | [Extract alias](#alias-extract-alias) |
| Notes | Alias must be declared on the same module |

![Example](assets/examples/alias/inline_alias.gif)

[▲ top](#available-refactorings)

<br>

### Alias: merge aliases

| | |
|-|-|
| Description | Merge a group of aliases into a nested alias |
| Target | Selection of two or more aliases |
| Inverse of | [Expand aliases](#alias-expand-aliases) |
| Notes | - |

![Example](assets/examples/alias/merge_aliases.gif)

[▲ top](#available-refactorings)

<br>

### Alias: sort nested aliases

| | |
|-|-|
| Description | Sort all aliases inside a nested alias |
| Target | Line of an unsorted nested alias |
| Inverse of | - |
| Notes | - |

![Example](assets/examples/alias/sort_nested_aliases.gif)

[▲ top](#available-refactorings)

<br>

### Function: expand anonymous function

* __Description__: expand an anonymous function from & to fn -> end syntax
Expand Down
Binary file added assets/examples/alias/expand_aliases.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/examples/alias/extract_alias.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/examples/alias/inline_alias.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/examples/alias/merge_aliases.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/examples/alias/sort_nested_aliases.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4d237af

Please sign in to comment.