|
|
@@ -2,18 +2,34 @@
|
|
|
|
|
|
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.
|
|
|
+
|
|
|
+
|
|
|
## Installation
|
|
|
|
|
|
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`
|
|
|
+
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
-`script.js [options] [glob patterns]`
|
|
|
+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]`
|
|
|
|
|
|
-`sync-package-json-deps.js -w --tab-width 4 './packages/*/package.json' 'package.json'`
|
|
|
+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]`
|
|
|
|
|
|
### Options:
|
|
|
|
|
|
@@ -42,3 +58,15 @@ flags: -h,--help
|
|
|
number of arguments: 0
|
|
|
|
|
|
default: false
|
|
|
+
|
|
|
+
|
|
|
+## Building
|
|
|
+
|
|
|
+Check out this repo, then:
|
|
|
+
|
|
|
+* Make sure you're using Node 20: `nvm use .`
|
|
|
+* Install deps (inc devDeps): `npm i` or `yarn`
|
|
|
+* Run the nexe build: `npm run build`
|
|
|
+
|
|
|
+If 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
|