Enable support for Node & Yarn installation #215
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for detection of a
package.json
oryarn.lock
, which will cause the following buildpacks/dependencies to be required as part of the build:yarn.lock
- requires install ofyarn
andnode
dependencies (can be provided by theyarn
&node-engine
buildpacks)package.json
- requires install ofnode
dependency (can be provided by thenode-engine
buildpack)The Javascript package manager file should be specified with the environment variable
BP_JS_PACKAGE_MANAGER_FILE
, which expects a path relative to your application root and points to apackage.json
oryarn.lock
file. This variable defaults to "", therefore requiring explicit opt-in to this feature.This will require both the Yarn and NodeEngine buildpacks to be added to the Java composite order group as optional.
Use Cases
Enables projects which build frontend/javascript code to run commands such as 'yarn' to build alongside Java code. See paketo-buildpacks/java#651.
Checklist