ensure-latest
v1.0.3
Published
Instead of specifying a wildcard version, ensure-latest checks that you have the latest version of a module whenever npm install is run.
Downloads
25
Readme
To install:
npm install ensure-latest --save
Add the script hook to your package.json:
"scripts": {
"preinstall": "[ -e ./node_modules/ensure-latest/index.js ] && node ./node_modules/ensure-latest || echo"
},
Finally, mark the modules that you want to ensure are latest in your package.json:
"ensureLatest": [ "grunt", "mocha" ],
"ensureLatestAlpha": [ "titanium" ]
Now whenever you run npm install
, you will see logging from ensure-latest!
If everything is up to date:
> npm install
> node ./node_modules/ensure-latest/run.js
Making sure we are using the latest versions of certain modules...
Ensured modules are up to date!
>
Or, if an update is available:
> npm install
> node ./node_modules/ensure-latest/run.js
Making sure we are using the latest versions of certain modules...
- Updating arrow from 0.3.35 to 0.3.38
Updated package.json with new module versions!
Followed by npm installing the new version.
Enjoy!
- Dawson Toth