# prejax

> 一款在发布模块前检查分支的工具

Latest version **0.0.2** (published 2017-11-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install prejax
pnpm add prejax
yarn add prejax
bun add prejax
```

Provides the command `prejax`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2017-11-29 |
| First published | 2017-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | riskers |
| Maintainers | risker |

## Links

- npm: https://www.npmjs.com/package/prejax
- Repository: https://github.com/riskers/jax
- Homepage: https://github.com/riskers/jax#readme
- Issues: https://github.com/riskers/jax/issues
- npm.io page: https://npm.io/package/prejax

## Dependencies (2)

- [colors](https://npm.io/package/colors.md) ^1.1.2
- [shelljs](https://npm.io/package/shelljs.md) ^0.7.8

## Recent versions

- 0.0.2 (latest) — 2017-11-29
- 0.0.1 — 2017-11-29

## README

## PREJAX

一款在发布模块前(npm publish)检查分支的工具:

* 检查当前分支是否是规定分支（保证都在指定发布发布）
* 检查当前发布的分支是否和远程分支一致（保证每次发布的都是最新代码）

### Install

`tnpm install prejax --save-dev` or `yarn add prejax --dev`

### Usage

在 `package.json` 中添加 `prepublish`:

```json
{
  "scripts": {
    "prepublish": "prejax"
  }
}
```

会在 `npm publish` 的时候默认检查当前是否是 **master** 分支，否则不会通过。

****

另外，提供可配置选项，可检查多个分支:

```json
"jaxBranches": [
  "master"
  "aaa",
  "bbb"
]
```

这样，会在 `npm publish` 的时候检查当前分支是否是上述分支中的一个，否则不会通过。

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