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

Environment Variable alternative for --production #1729

Closed
toastercup opened this issue Mar 10, 2015 · 5 comments
Closed

Environment Variable alternative for --production #1729

toastercup opened this issue Mar 10, 2015 · 5 comments

Comments

@toastercup
Copy link

Proposal

Right now, a --production flag can be applied to install and prune, but there is no way to skip devDependencies installation with an environment variable. I'm interested in a feature similar to Bundler's BUNDLE_WITHOUT environment variable, which acts as an alternative to the CLI flag --without. You can see this documented in their man page.

Use Case

This would primarily be useful for server environments, where, ideally, the provisioning routine is controlled by environment variables rather than modifying a script per-environment, or the script detecting production vs. development and executing different commands for each.

Implementation

I'm interested in creating the pull request for this feature. The implementation would be fairly straightforward: the only considerations in my mind are:

  • The name of the env variable. BOWER_PRODUCTION, perhaps? Does Bower have any other examples of env variables in use right now?
  • Which flag takes priority - I would almost certainly assume the CLI flag would override anything in the environment, but I will leave that up to the maintainer.
@sheerun
Copy link
Contributor

sheerun commented Mar 11, 2015

Hey. I think ideally --production would be configuration flag (shortcut for --config.production=true).

In that case you would just use BOWER_PRODUCTION=1

For now CLI options are parsed separately from config options.

@sheerun sheerun added this to the 1.4 milestone Mar 11, 2015
@sheerun
Copy link
Contributor

sheerun commented Mar 11, 2015

Maybe you'd like to prepare PR for it + tests? Best for all commands.

@Clement-TS
Copy link

Hi,
what is the current status of this enhancement?

@sheerun
Copy link
Contributor

sheerun commented Oct 13, 2017

no progress has been done

@sheerun
Copy link
Contributor

sheerun commented Apr 26, 2020

Bower is deprecated now, and in maintenance mode. Because of this we won't implement new features like this one. We recommend switching to Yarn or npm, and migrating with bower-away

@sheerun sheerun closed this as completed Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants