Skip to content

Commit

Permalink
Add disableExportAssets attr key
Browse files Browse the repository at this point in the history
  • Loading branch information
mkurz committed Jun 16, 2024
1 parent 92ac5e4 commit 5fedde2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/scala/com/typesafe/sbt/web/SbtWeb.scala
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ object Import {
)
val stagingDirectory = SettingKey[File]("web-staging-directory", "Directory where we stage distributions/releases.")

val disableExportAssets = AttributeKey[Boolean](
"disableExportAssets",
"If added to the state and set to true, the assets will not be exported"
)
}

object WebJs {
Expand Down Expand Up @@ -408,7 +412,7 @@ object SbtWeb extends AutoPlugin {
exportConf: Configuration,
track: TrackLevel
): Def.Initialize[Task[Classpath]] = Def.taskDyn {
if ((exportConf / exportJars).value) Def.task {
if ((exportConf / exportJars).value || state.value.get(disableExportAssets).getOrElse(false)) Def.task {
Seq.empty
}
else {
Expand Down

0 comments on commit 5fedde2

Please sign in to comment.