I want to fail an npm script if an environment variable isn't set. Is there a way to do this easily? I would like to do this from the package.json not the actual script.
I also need this to be cross environment (AKA it should be able to run on *nix and Windows).