Skip to content

Instantly share code, notes, and snippets.

@joeybaker
Created August 7, 2015 00:13
Show Gist options
  • Save joeybaker/4d20303d56d8cb8a82af to your computer and use it in GitHub Desktop.
Save joeybaker/4d20303d56d8cb8a82af to your computer and use it in GitHub Desktop.
"note6": "cirlce ci gives us the ability to run set-npm-token before npm i, heroku does not, so we have to detect the heroku env and manually run npm install because changing .npmrc from an npm hook isn't pick up until the next run of npm",
"set-npm-token": "if [ -n \"${NPM_TOKEN-}\" ]; then echo \"//registry.npmjs.org/:_authToken=$NPM_TOKEN\" >> .npmrc; fi",
"preinstall": "npm run set-npm-token && if [ -n \"${DEPLOY_ENV-}\" ]; then echo installing; npm install --unsafe-perm --userconfig .npmrc --ignore-scripts; fi",
"postinstall": "if [ -n \"${DEPLOY_ENV-}\" ]; then npm run build; fi"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment