Created
September 14, 2018 21:04
-
-
Save jamiehs/fe18827ca0220b5b1c34de565d463783 to your computer and use it in GitHub Desktop.
When Node is installing dependancies, there is a variable we can use to conditionally run something in production/!production
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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