readme tweaks - fixes #22

This commit is contained in:
silverwind 2019-03-07 21:23:03 +01:00
parent 688ff6bf6a
commit e2364c9279
Signed by: silverwind
GPG Key ID: 2E62B41C93869443
2 changed files with 20 additions and 28 deletions

@ -1,20 +1,33 @@
# updates
[![](https://img.shields.io/npm/v/updates.svg?style=flat)](https://www.npmjs.org/package/updates) [![](https://img.shields.io/npm/dm/updates.svg)](https://www.npmjs.org/package/updates) [![](https://api.travis-ci.org/silverwind/updates.svg?style=flat)](https://travis-ci.org/silverwind/updates)
> Fast npm dependency updating tool
> flexible npm dependency update tool
`updates` is a CLI tool which checks for npm dependency updates of the current project and optionally updates `package.json`. It is highly configurable and is typically able to complete in less than a second.
<p align="center">
<img src="https://i.imgur.com/tI7rp0g.png"/>
</p>
`updates` is a CLI tool which checks for npm dependency updates of the current project and optionally updates `package.json`. It is typically able to complete in less than a second.
## Install
## Usage
```console
$ npm i -g updates
```
# Usage
Then, check for new updates:
```console
$ updates
```
When changes are satisfactory, update `package.json` and re-install modules:
```console
$ updates -u && rm -rf node_modules && yarn
```
## Options
See `--help` or below for the available options. Option that take multiple arguments can take them either via comma-separated value or by specifying the option multiple times. If an option has a optional `pkg` argument but non is given, the action will be applied to all packages instead.
```
usage: updates [options]
@ -45,28 +58,7 @@ usage: updates [options]
$ updates -u -t devDependencies
```
## Examples
### Check for updates
```console
$ updates
NAME OLD NEW INFO
string-width 2.1.1 3.0.0 https://github.com/sindresorhus/string-width
eslint 5.9.0 5.10.0 https://github.com/eslint/eslint
eslint-config-silverwind 2.0.11 2.0.12 https://github.com/silverwind/eslint-config-silverwind
```
### Update package.json
```console
$ updates -u
NAME OLD NEW INFO
string-width 2.1.1 3.0.0 https://github.com/sindresorhus/string-width
eslint 5.9.0 5.10.0 https://github.com/eslint/eslint
eslint-config-silverwind 2.0.11 2.0.12 https://github.com/silverwind/eslint-config-silverwind
╭────────────────────────╮
│ package.json updated │
╰────────────────────────╯
```
### JSON Output
## JSON Output
The JSON output is an object with possible properties `results`, `message` and `error`:

@ -1,7 +1,7 @@
{
"name": "updates",
"version": "7.2.0",
"description": "Fast npm dependency updating tool",
"description": "flexible npm dependency update tool",
"author": "silverwind",
"repository": "silverwind/updates",
"license": "BSD-2-Clause",