Skip to content

Commit

Permalink
doc(readme): fix install informactions (#29)
Browse files Browse the repository at this point in the history
- Fix how to execute by npx
- Remove unnecessary bash aliases explanation
- Fix ignore-pattern value

closes #28
  • Loading branch information
jmlavoier authored Jan 15, 2023
1 parent 5ca0019 commit 233bcbd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
18 changes: 4 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Recommended node version equal to or greater than `v16`
You don't need to install it globally, if the idea is to use it sometimes, you can just execute it into your git project, so that you will execute the latest stable version.

```shell
$ npx clear-branches
$ npx clear-branches@latest
```

Or install it on your machine:
Expand All @@ -42,18 +42,6 @@ $ yarn global add clear-branches
$ npm i -g clear-branches
```

If you're using nvm to manage node versions, pay attention to the node version you're using to create the alias in your bash profile:

```shell
alias clear-branches="node ~/.nvm/versions/node/v19.3.0/lib/node_modules/clear-branches"
```

Creating a dynamic alias that will execute from the current node version forces the user to be in the same version that **clear-branches** was installed.

```shell
alias clear-branches="node $(npm root --global)/clear-branches"
```

**output**

Now **clear-branches** is executable anywhere you want, if you try into your project you will see the list of branches it will delete and a confirmation message:
Expand Down Expand Up @@ -91,6 +79,8 @@ By default, **clear-branches** ignores these branches.
develop
```

_\*The current branch is ignored and is not possible to force delete it_

Using `clear-branches --force=<branch>[,<branch>],` you will be able not to ignore any of these branches.

I.e.:
Expand Down Expand Up @@ -118,7 +108,7 @@ $ clear-branches --ignores=feat/component,feat/feature

_In this example, `feat/component` and `feat/feature` won't be deleted._

### clear-branches --ignore-pattern=<pattern>
### clear-branches --ignore-pattern=\<pattern>

It ignores all branches that match a regex.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clear-branches",
"version": "1.0.2",
"version": "1.0.3",
"description": "easy way to clear your local branches",
"main": "dist/clear-branches.js",
"repository": "[email protected]:jmlavoier/clear-branches.git",
Expand Down

1 comment on commit 233bcbd

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines Statements Branches Functions
Coverage: 7%
7.01% (8/114) 6.66% (2/30) 18.18% (6/33)

Please sign in to comment.