Skip to content

Instantly share code, notes, and snippets.

@jamiehs

jamiehs/package.json

Created Sep 14, 2018
Embed
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
You can’t perform that action at this time.