nvm-guard
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

nvm-guard

Enforce correct .nvmrc version when running npm scripts

npm version npm downloads npm license eslint

Installation

npm install nvm-guard --save-dev

Why?

nvm-guard protects your npm scripts for being ran with wrong Node.js version. Make sure that all contributors are using the specified version and avoid unnecessary dependency hassle.

nvm-guard

Usage

In your package.json add nvm-guard as a pre-hook or before the scripts you want to protect.

{
  "scripts": {
    // When running npm run eslint, we'll first call nvm-guard, then ESLint if nvm-guard passes
    "eslint": "nvm-guard && eslint src/",
 
    // Will be called before npm test
    // npm docs: https://docs.npmjs.com/misc/scripts
    "pretest": "nvm-guard",
  }
}

Related

License

MIT © Daniel Eckermann

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.4402latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.4402
1.0.30
1.0.21
1.0.10
1.0.00
0.0.80
0.0.70
0.0.60
0.0.51
0.0.42
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i nvm-guard

Weekly Downloads

406

Version

1.0.4

License

MIT

Unpacked Size

453 kB

Total Files

10

Last publish

Collaborators

  • ecrmnn