1. engine-dependencies
Install different versions of dependencies depending on which version of Node you are using
engine-dependencies
Package: engine-dependencies
Created by: bitovi
Last modified: Fri, 17 Jun 2022 05:23:18 GMT
Version: 0.2.12
License: MIT
Downloads: 3,833
Repository: https://github.com/bitovi/engine-dependencies

Install

npm install engine-dependencies
yarn add engine-dependencies

Build Status
Build status
npm version

engine-dependencies

Specify package dependencies based on what version of Node you are using. Useful if you're trying to support Node 0.10.x, 0.12.x and IO.js.

CLI

You can use engine-dependencies within your process as a post-install script. Just define your dependencies in the engineDependencies field of your package.json:

 {
	"name": "my-lib",
	"version": "1.0.0",
	"engineDependencies": {
		"node": {
			"0.12.x": {
				"devDependencies": {
					"semver": "^1.0.0"
				}
			}
		},
		"iojs": {
			"^3.0.0": {
				"semver": "2.0.0"
			}
		}
	}
	...
}

And then add to your scripts:

 {
	"name": "my-lib",
	"version": "1.0.0",
	"scripts": {
		"postInstall": "install-engine-dependencies my-lib"
	}
	...
}

Node API

 engineDependencies({
	"node": {
		"0.10.x": {
			"devDependencies": {
				"jquery": "1.8.0"
			}
		},
		"0.12.x": {
			"jquery": "^1.11.2"
		}
	},
	"iojs": {
		"^3.0.0": {
			"devDependencies": {
				"jquery": "2.1.4"
			}
		}
	}
}, function(err){
	// all done
});

License

MIT

Dependencies

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code