This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Plugin} from "vite"; | |
interface PluginConfig { | |
excludeExtensions?: string[] | |
} | |
interface ResolvedPluginConfig extends PluginConfig { | |
excludeExtensions: string[] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val isScala3Setting = Def.setting { | |
isScala3(CrossVersion.partialVersion(scalaVersion.value)) | |
} | |
def isScala3(v: Option[(Long, Long)]): Boolean = v.exists(_._1 != 2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package app.tulz.tuplez | |
trait ApplyConverterInstancesPriLow[O] { | |
implicit def singleParam[T1]: ApplyConverter[T1, O] { type In = (T1) => O } = new ApplyConverter[T1, O] { | |
type In = T1 => O | |
def apply(fn: T1 => O): T1 => O = fn | |
} | |
} | |
trait ApplyConverterInstances[O] extends ApplyConverterInstancesPriLow[O] { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package app.tulz.tuplez | |
abstract class ApplyConverter[L, O] { | |
type In | |
def apply(f: In): L => O | |
} | |
trait ApplyConverters[O] extends ApplyConverterInstances[O] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File | |
import scala.reflect.macros.blackbox | |
object FileToLiteral { | |
def apply(fileName: String): String = macro FileToLiteralImpl.referEmbeddedFile | |
} | |
class FileToLiteralImpl(val c: blackbox.Context) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sbt._ | |
import sbt.Keys._ | |
import sbt.KeyRanks._ | |
import java.nio.file.Files | |
import java.nio.file.Path | |
import sbt.nio._ | |
import sbt.nio.Keys._ | |
object EmbeddedFilesGenerator extends AutoPlugin { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package app.tulz.tuplez | |
object TupleComposition { | |
def compose[L, R](l: L, r: R)(implicit composition: Composition[L, R]): composition.Composed = composition.compose(l, r) | |
} | |
abstract class Composition[-A, -B] { | |
type Composed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package app.tulz.tuplez | |
object TupleComposition { | |
def compose[L, R](l: L, r: R)(implicit composition: Composition[L, R]): composition.Composed = composition.compose(l, r) | |
} | |
abstract class Composition[-A, -B] { | |
type Composed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package app.tulz.tuplez | |
object TupleComposition { | |
def compose[L, R](l: L, r: R)(implicit composition: Composition[L, R]): composition.Composed = composition.compose(l, r) | |
} | |
abstract class Composition[-A, -B] { | |
type Composed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package app.tulz.tuplez | |
object TupleComposition { | |
def compose[L, R](l: L, r: R)(implicit composition: Composition[L, R]): composition.Composed = composition.compose(l, r) | |
} | |
abstract class Composition[-A, -B] { | |
type Composed |
NewerOlder