package.json: engines & engineStrict - and how to use them
March 24, 2015
I’m poking around quite a lot with io.js recently for reasons that soon will be revealed. When doing so I used my favorite Node version manager - Node Version Manager to manage different versions of Node and io.js.
Switching back and forth is simple and sometimes I end up running some code on a version of Node/io.js that the code does not support. For example running EcmaScript 6
let-statements in Node.
I was hoping that I’d get a warning or preferable even an error when doing that. But no. Or…
In this post I’ll show you how to use the package.json file to make sure that you get warnings and errors when using the wrong version of the framework
In the package.json there’s an optional node that you can set called
engines. From the documentation we...