1.0.1 • Published 8 months ago
engines-package v1.0.1
# Node Engines
**Node Engines** is a command-line tool that helps developers automatically detect and update the Node.js and npm versions in their project's `package.json` file; usefull when workign with NVM.
## Installation
You can install the **Node Engines** package globally using npm:
`npm install -g node-engines`
## Usage
After installing the package, you can use the `node-engines` command from any directory where you have a `package.json` file to detect and update the Node.js and npm versions.
Here's how you can use it:
`node-engines`
Running the `node-engines` command will perform the following actions:
1. Detect the current Node.js version installed on your system.
2. Detect the current npm (Node Package Manager) version.
3. Update the `engines` field in your project's `package.json` to specify the detected Node.js and npm versions.
If the `package.json` file does not exist in the current directory, the tool will display an error message.
### Example
Before running `node-engines`, your `package.json` may look like this:
{
"name": "my-node-app",
"version": "1.0.0",
"engines": {
"node": ">=12.0.0",
"npm": ">=6.0.0"
},
// ...
}
After running `node-engines`, your `package.json` will be updated with the detected versions:
{
"name": "my-node-app",
"version": "1.0.0",
"engines": {
"node": ">=14.17.5",
"npm": ">=7.24.0"
},
// ...
}
## Contributing
If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the [GitHub repository](https://github.com/jmullings/node-engines).
## License
This package is released under the [MIT License](LICENSE).
1.0.1
8 months ago