Git Product home page Git Product logo

heroku-buildpack-npmrc's Introduction

heroku-buildpack-npmrc

A Heroku buildpack for overriding the .npmrc file in the build directory with the contents of a config var. Useful for authorizing with npm when installing private packages.

Configure Multiple Buildpacks

Option 1: Heroku CLI or Dashboard

Add the buildpack to your Heroku app either using the CLI or the Heroku dashboard. The heroku-buildpack-npmrc needs to run before any buildpack using npm. In the following example, it runs before the heroku/nodejs buildpack.

$ heroku buildpacks:set --index 1 https://github.com/debitoor/heroku-buildpack-npmrc.git
$ heroku buildpacks:add heroku/nodejs

Option 2: Use heroku-buildpack-multi

Instead of setting the buildpacks directly with Heroku they can also be configured using a .buildpacks in combination with heroku-buildpack-multi.

$ heroku buildpacks:set https://github.com/heroku/heroku-buildpack-multi.git  

The same example given for the CLI use would have the following .buildpacks file.

$ cat .buildpacks
https://github.com/debitoor/heroku-buildpack-npmrc.git
https://github.com/heroku/heroku-buildpack-nodejs.git

Configure Config Var

Add the NPMRC config var in Heroku with the contents of your .npmrc file.

 $ heroku config:set NPMRC=//registry.npmjs.org/:_authToken=00000000-0000-0000-0000-000000000000

heroku-buildpack-npmrc's People

Contributors

jonatanpedersen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.