Skip to content

Heroku buildpack for modifying the .npmrc file based on .env variables

License

Notifications You must be signed in to change notification settings

BloomTechEng/heroku-buildpack-npmrc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

heroku-buildpack-npmrc

Heroku buildpack for modifying the .npmrc file based on .env variables

Usage

Add the buildpack

  1. On the settings page for your app, e.g. https://dashboard.heroku.com/apps/MY-APP/settings, find the Buildpacks section.
  2. Click on the 'Add buildpack' button.
  3. Provide the URL for this repository: https://github.com/LambdaSchool/heroku-buildpack-npmrc.git
  4. Click 'Save Changes'
  5. Verify that this build pack is used before the heroku/nodejs build pack.
    • If you have already added heroku/nodejs, use the UI to re-order the build packs so that heroku-buildpack-npmrc comes first.
    • If you haven't added heroku/nodejs, add it now. It should be placed after heroku-buildpack-npmrc.

Set the environment variable

While still on the settings page, add an environment variable NPM_TOKEN=00000000-0000-0000-0000-000000000000. When this variable is present, it will be inserted into the .npmrc file like so: //registry.npmjs.org/:_authToken=00000000-0000-0000-0000-000000000000

About

Heroku buildpack for modifying the .npmrc file based on .env variables

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages