Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit 8eec22a

Browse files
Add documentation about releasing and prepack npm hook to build the project (#106)
1 parent ff40d8b commit 8eec22a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

docs/RELEASING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Releasing npm package
2+
3+
* Install or upgrade `np` package globally (`npm install -g np`)
4+
* Login to npm with `npm adduser`
5+
* Create new branch, e.g. `1.2.0`, add upstream
6+
* Run this to publish package `np --any-branch`
7+
8+
N.B. As the project must be compiled to JS before publishing, we added a `prepack` npm hook to take care of this.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"ruling": "ts-node ruling/index.ts",
2121
"typecheck": "tsc -p tsconfig.json",
2222
"lint": "eslint --ext js,ts src tests ruling/index.ts",
23-
"precommit": "lint-staged && yarn typecheck"
23+
"precommit": "lint-staged && yarn typecheck",
24+
"prepack": "yarn build"
2425
},
2526
"peerDependencies": {
2627
"eslint": "^3.0.0 || ^4.0.0 || ^5.0.0"

0 commit comments

Comments
 (0)