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

Package configurations taking priority over environment variables #33

Open
Enet4 opened this issue Sep 28, 2015 · 0 comments
Open

Package configurations taking priority over environment variables #33

Enet4 opened this issue Sep 28, 2015 · 0 comments

Comments

@Enet4
Copy link

Enet4 commented Sep 28, 2015

I have a use case where I would like environment variable definitions to override properties to envify, the default values of which would be contained in the package.json file. Something like this:

  "scripts" {
    "build-yes": "MY_VAR=YES browserify .",
    "build": "browserify ."
  },
  "browserify": {
    "transform": [
      "babelify",
      "browserify-shim",
      [
        "envify",
        {
          "MY_VAR": "NO"
        }
      ]
    ]
  }

Unfortunately, the re-definition derived from the script "build-yes" does not take place. Removing the definition of "MY_VAR":"NO" in the package is the only way for "MY_VAR=YES" to reach the transform. Is this the desired behaviour? Could these priorities be reconsidered?

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

No branches or pull requests

1 participant