Support configuring .npmrc
and .yarnrc
via service bindings
#292
Labels
enhancement
A new feature or request
.npmrc
and .yarnrc
via service bindings
#292
Implement paketo-buildpacks/nodejs#396 in the Yarn Install buildpack.
Its somewhat common in Yarn v1 workflows to set configurations via an
.npmrc
file. It would be helpful for users to be able to pass an.npmrc
or a.yarnrc
via a service binding into the build context, to support use cases like #244.Implementation Notes
Unlike the NPM Install use case, we do not need to set the
NPM_CONFIG_GLOBALCONFIG
environment variable. To leverage this feature, we should simply take the contents of the.npmrc
or.yarnrc
file passed as a service binding, and make it available in the build container at the.npmrc
or.yarnrc
global config location. Useyarn config --list
in a buildpack-built container to see an enumeration of the locations where yarn looks for config files. The buildpack should not place a.yarnrc
or.npmrc
file in the app directory as it may override one that's been intentionally provided by the app developer.This will enable buildpack-users who do not use
pack
as a platform to make these configuration files available without committing it to the source code repository.The text was updated successfully, but these errors were encountered: