secret black magic you should use...
What is npm?
npm is a command line interface (CLI) tool
- publish: when a package is published.
- install: when a package is installed
- uninstall: when a package is uninstalled.
- version: when a version bump of a package version.
- test: used to run tests for the package
- stop: when the start command ends.
- start: used to start the package.
- restart: Used to restart the project and if there isn't one defined will run the stop and start scripts
phases of scripts!
For every script that you create there are 3 phases:
- pre phase
- the script itself
- post phase
The big reveal...
If you would like to see what scripts are defined for you to run on any project (with a package.json).
stitching it all together...
So now that we have seen there are built in scripts and built in pre and post commands for all npm scripts default and custom created... we can almost create workflows and processes as part of these scripts...
Thanks & Goodnight
- My name is Robbie Holmes
- robbiethegeek everywhere on the interwebs
- I work at the Department of Veterans Affairs for the United States Digital Service
By Robbie Holmes