Tanin
Tanin

Reputation: 1933

Use different sbt-web SettingKey values when running `stage` and `run`

I am writing an SBT plugin. In the plugin, I have:

val prod = SettingKey[Boolean]("prod", "This will minify stuffs.")

In build.sbt of a project that uses this plugin, I want to set different values when running sbt stage and sbt run.

I've tried many different combinations, and they don't work (e.g. prod in Assets in stage := true).

I wonder if anyone knows how to solve this problem. It seems like a normal problem that should have been easily solved with scoping, but I don't understand SBT's scope that well.

If you have a small example on how to override SettingKey when running different commands, it would be great. Thank you.

Upvotes: 1

Views: 50

Answers (0)

Related Questions