# @macchie7/easytag

> Easy NPM Versioning & Tag Tool

Latest version **2.0.0** (published 2023-04-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @macchie7/easytag
pnpm add @macchie7/easytag
yarn add @macchie7/easytag
bun add @macchie7/easytag
```

Provides the command `easytag`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2023-04-06 |
| First published | 2023-04-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Andrea Macchieraldo |
| Maintainers | macchie7 |
| Keywords | versioning, semver, easytag |

## Links

- npm: https://www.npmjs.com/package/@macchie7/easytag
- npm.io page: https://npm.io/package/@macchie7/easytag

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [semver](https://npm.io/package/semver.md) ^7.3.8

## Recent versions

- 2.0.0 (latest) — 2023-04-06
- 1.0.3 — 2023-04-05
- 1.0.2 — 2023-04-05
- 1.0.1 — 2023-04-05
- 1.0.0 — 2023-04-05

## README

# easytag
####

![GitHub package.json version](https://img.shields.io/github/package-json/v/macchie/easytag?style=for-the-badge) ![npm (scoped)](https://img.shields.io/npm/v/@macchie7/easytag?style=for-the-badge) ![npm](https://img.shields.io/npm/dw/@macchie7/easytag?style=for-the-badge)


`easytag` simplifies Versioning & Tagging when you need to deliver multiple versioning depending on your GIT branch.

While using `easytag` tagging through `npx easytag [patch|minor|major]` commands will trigger a custom procedures that will sequentially perform:

- update of your `package.json` version depending on the release type (`patch`, `minor`, `major`)
- add `package.json` to GIT changes, tag & create commit with tag name in the message (see below for default naming convention)
- `push` both your changes and your tags (`git push && git push --tags`)

### Default Naming Convention
##### Master/Main Branch

- `master` => `vX.Y.Z`
- `main` => `vX.Y.Z`

##### Other Branches

- `feauture/example` => `feauture-example-vX.Y.Z`
- `test` => `test-vX.Y.Z`
- `mybranch` => `mybranch-vX.Y.Z`

### Setup

Inside your NPM project execute:

```bash
$ npx @macchie7/easytag --init
```

`easytag` replaces your `preversion` and `preversion` script inside `package.json` to be able to intercept and disable them.

### Usage

`easytag` relicates `npm version *` commands:

- `npx easytag [ patch | minor | major ]`

### Parameters

Edit your `config` inside `package.json` to add extra parameters:

##### Example

```json
{
  "config": {
    "easytag": {
      // disable push after tagging
      "noPush": true, 
      // master/main branch format (default: v1.2.3)
      "masterFormat": "{{version}}", 
      // others branch format (default: branchname-v1.2.3)
      "branchFormat": "{{branchName}}-{{version}}"
    }
    ...
  }
  ...
}
```

---
_Source: https://npm.io/package/@macchie7/easytag · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
