Skip to content

Commit

Permalink
Enforce custom package for library plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindberg committed Jun 17, 2020
1 parent c0ec940 commit a10c5be
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import java.time.Instant
import com.olvind.logging
import com.olvind.logging.LogLevel
import org.scalablytyped.converter.internal.importer.jsonCodecs.{FileDecoder, FileEncoder}
import org.scalablytyped.converter.internal.scalajs.QualifiedName
import org.scalablytyped.converter.internal.scalajs.{Name, QualifiedName}
import org.scalablytyped.converter.internal.ts.TsIdentLibrary
import org.scalablytyped.converter.internal._
import sbt.Keys._
Expand Down Expand Up @@ -63,6 +63,10 @@ object ScalablyTypedConverterGenSourcePlugin extends AutoPlugin {
}
val conversion = stConversionOptions.value

if (conversion.outputPackage == Name.typings) {
logger.fatal("You must set `stOutputPackage` to a custom package")
}

val minimizeKeep = IArray
.fromTraversable(stMinimizeKeep.value)
.map(str => QualifiedName(conversion.outputPackage +: QualifiedName(str).parts))
Expand Down

0 comments on commit a10c5be

Please sign in to comment.