a script to find and fix out-of-sync dependencies in package.json files
|
|
1 年之前 | |
|---|---|---|
| src | 1 年之前 | |
| .gitignore | 1 年之前 | |
| .nvmrc | 1 年之前 | |
| README.md | 1 年之前 | |
| eslint.config.js | 1 年之前 | |
| package-lock.json | 1 年之前 | |
| package.json | 1 年之前 |
A script to find and fix out-of-sync dependencies in package.json files.
Pass this script an array of globs or paths to your package.json files, it'll collect all dependencies and highlight
those that don't match across package definitions. When run with the -w/--write flag, will update all package.json
files to the latest found version across all files.
Install and run from your project folder, globally, or use npm run build to compile a (massive) single executable and stick it
in your path.
npm i -g /path/to/sync-package-json-deps/repo
npm i -g git+https://git.lpapi.io/leakypixel/sync-package-json-deps
As a standalone script (ensure you have deps installed globally):
node /path/to/script.js [options] [glob patterns]
From this project:
npm run sync [options] [glob patterns]
As a binary in your path:
sync-package-json-deps [options] [glob patterns]
Through npx (if installed globally):
npx sync-package-json-deps [options] [glob patterns]
tabWidth: Tab width in spaces, passed to JSON.stringify for output.
flags: -tw,--tab-width
number of arguments: 1
default: 2
write: Write changes to files.
flags: -w,--write
number of arguments: 0
default: false
help: Prints the help message, options and usage info then exits.
flags: -h,--help
number of arguments: 0
default: false
Check out this repo, then:
nvm use .npm i or yarnnpm run buildIf you're having trouble with nexe, it's best to treat that as a separate issue unrelated to this repo and look for information/help over there: https://github.com/nexe/nexe