Add env support to npm

A lot of npm configuration can be done with env vars and there are no corresponding CLI switches so might as well just expose this.