Comparing version 2.4.0 to 2.5.0
11
cli.js
@@ -9,4 +9,7 @@ #!/usr/bin/env node | ||
Usage | ||
$ np [major | minor | patch | premajor | preminor | prepatch | prerelease | <version>] (Default: patch) | ||
$ np <version> | ||
Version can be: | ||
patch | minor | major | prepatch | preminor | premajor | prerelease | 1.2.3 | ||
Options | ||
@@ -19,3 +22,2 @@ --any-branch Allow publishing from any branch | ||
Examples | ||
$ np | ||
$ np patch | ||
@@ -28,2 +30,7 @@ $ np 1.0.2 | ||
if (cli.input.length === 0) { | ||
console.error('Specify a version\n\nExample: $ np patch'); | ||
process.exit(1); | ||
} | ||
np(cli.input[0], cli.flags) | ||
@@ -30,0 +37,0 @@ .then(pkg => { |
{ | ||
"name": "np", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "A better `npm publish`", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -32,4 +32,7 @@ # np [](https://travis-ci.org/sindresorhus/np) | ||
Usage | ||
$ np [major | minor | patch | premajor | preminor | prepatch | prerelease | <version>] (Default: patch) | ||
$ np <version> | ||
Version can be: | ||
patch | minor | major | prepatch | preminor | premajor | prerelease | 1.2.3 | ||
Options | ||
@@ -42,4 +45,3 @@ --any-branch Allow publishing from any branch | ||
Examples | ||
$ np | ||
$ np major | ||
$ np patch | ||
$ np 1.0.2 | ||
@@ -52,7 +54,18 @@ $ np 1.0.2-beta.3 --tag=beta | ||
You can use any of the test/version/publish related [npm lifecycle hooks](https://docs.npmjs.com/misc/scripts) to add extra behavior. | ||
You can use any of the test/version/publish related [npm lifecycle hooks](https://docs.npmjs.com/misc/scripts) in your package.json to add extra behavior. | ||
For example, here we build the documentation before tagging the release: | ||
```json | ||
{ | ||
"name": "my-awesome-package", | ||
"scripts": { | ||
"preversion": "./build-docs" | ||
} | ||
} | ||
``` | ||
## License | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) |
7639
143
69