npm.io
0.4.4 • Published 4 years agoCLI

dependency-version-sync

Licence
MIT
Version
0.4.4
Deps
3
Size
9 kB
Vulns
0
Weekly
0

npm node size

dependency-version-sync

Synchronize and update the dependencies of the package.json to the installed version

Install

npm:

$ npm install -g dependency-version-sync

yarn:

$ yarn add global dependency-version-sync

Usage

Using in code
Using es5 in node
const dvs = require('dependency-version-sync');

dvs(opts);
Using es6 or typescript in node
import dvs from 'dependency-version-sync';

dvs(opts);
Command line usage

First, you have to install the dependency package globally

$ dvs [options]

example:

$ dvs -m yarn -pre dev -f "^@babel.+" -i
Command line options
Options:
  -v, --version                output the version number
  -c, --cwd <path>             used as current working directory for `exec` in npm listing
  -m, --packageManager <name>  npm or yarn (default: "npm")
  -p, --pre <pre>              select a package.json dependencies prop, option:["","dev","optional"], default all dependencies props
  -f, --filter <package>       RegExp or String, filter specified packages
  -i, --install                whether to execute `npm install` for synchronization
  -h, --help                   display help for command

Keywords