Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .yarnrc env config option #3218

Merged
merged 3 commits into from
Apr 26, 2017
Merged

Add .yarnrc env config option #3218

merged 3 commits into from
Apr 26, 2017

Conversation

sebmck
Copy link
Contributor

@sebmck sebmck commented Apr 21, 2017

Summary

This PR adds an option called env to .yarnrc. It allows you to specify environment variables that will be exposed to lifecycle scripts.

For example:

.yarnrc

env:
  FOO "BAR"

package.json

{
  "scripts": "node install.js"
}

install.js

console.log(process.env.FOO === "bar");

Test plan

Added a test.

@torifat
Copy link
Member

torifat commented Apr 22, 2017

LGTM 👍

@bestander bestander merged commit 1638d06 into master Apr 26, 2017
@DanBuild DanBuild mentioned this pull request May 2, 2017
@sebmck sebmck deleted the env-config branch May 10, 2017 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants