Check out one of npm's latest features: the "ci" command. https://github.com/npm/npm/blob/6ccf3d732031e0f4b7ef750da922e2a32a7018c8/doc/cli/npm-ci.md