0.4.4 • Published 2 years ago

dependency-version-sync v0.4.4

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

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