update dependencies and devDependencies
use npm_lifecycle_event environment variable

https://www.npmjs.org/doc/misc/npm-scripts.html#current-lifecycle-event