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

Commit 1187fc3

Browse files
authored
Merge pull request #96 from segmentio/np
Replace robo with np for releasing.
2 parents aff3130 + 7c1f1b9 commit 1187fc3

File tree

4 files changed

+413
-24
lines changed

4 files changed

+413
-24
lines changed

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,3 @@ To build this into a full, usable library, see the [Analytics.js](https://github
1212
Released under the [MIT license](License.md).
1313

1414
[analytics.js]: https://segment.com/docs/libraries/analytics.js/
15-
16-
## Releasing
17-
18-
1. Update the version in `package.json`.
19-
2. Run `robo release x.y.z` where `x.y.z` is the new version.

RELEASING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# RELEASING
2+
3+
We automatically publish Github tagged releases from our CI to NPM.
4+
5+
We use [`np`](https://github.com/sindresorhus/np) to prepare a release.
6+
7+
`np` will be automatically installed by running `yarn`, and you can run it with `yarn run np`. You can pass flags to it just as you would with `np`, e.g. you can run `yarn np minor`.
8+
9+
If you run `np` directly, take care to use the [`--no-publish`](https://github.com/sindresorhus/np#publish-with-a-ci) flag. This ensures that we don't directly publish to NPM from a local dev machine.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"test": "make test",
1515
"lint": "eslint \"./{lib,test}/**/*.js\"",
1616
"format": "prettier-eslint --write --list-different \"./{lib,test}/**/*.{js,json,md}\"",
17-
"precommit": "lint-staged"
17+
"precommit": "lint-staged",
18+
"np": "np --no-publish"
1819
},
1920
"lint-staged": {
2021
"linters": {
@@ -98,6 +99,7 @@
9899
"karma-summary-reporter": "^1.5.0",
99100
"lint-staged": "^7.2.0",
100101
"mocha": "^2.2.5",
102+
"np": "^3.0.4",
101103
"phantomjs-prebuilt": "^2.1.7",
102104
"prettier-eslint-cli": "^4.7.1",
103105
"proclaim": "^3.4.1",

0 commit comments

Comments
 (0)