Skip to content

Instantly share code, notes, and snippets.



Created Sep 14, 2018
What would you like to do?
When Node is installing dependancies, there is a variable we can use to conditionally run something in production/!production
"scripts": {
"postinstall": "if [ -n \"$npm_config_production\" ]; then npm run build; fi"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment