Parse package.json, inspect engines property and ensure command runs with right node.js version
Parse package.json, inspect engine property and ensure command runs with right node.js version.
Engineer makes it trivial to run a command in an environment where
npm match those
specified by a particular package.json's
This makes it a no-brainer to run an arbitrary package under whatever version of node it needs. Engineer uses
semver to do the heavy lifting ot installing and checking for valid node.js versions.
npm install -g engineer
execute command with node version acceptable to engine package.json propertyusage: node ./main.jsOptions:-c Shell command [required]-f Path to package.json [required]Missing required arguments: c, f
$ engineer -f package.json -c 'npm ls'local versions: ["0.6.19"]Local version 0.6.19 satisfies range >=0.6.0 <0.7.0running cmd: ["./node_modules/nave/nave.sh","use","0.6.19","npm","ls"]email@example.com /Users/nialljohiggins/projects/node-engineer├── firstname.lastname@example.org extraneous├─┬ email@example.com extraneous│ ├── firstname.lastname@example.org│ ├── email@example.com│ ├── firstname.lastname@example.org│ ├── email@example.com│ └─┬ firstname.lastname@example.org│ └── email@example.com├── firstname.lastname@example.org├─┬ email@example.com│ └── firstname.lastname@example.org└── email@example.com
This is a glue package which relies on: