init(12): new sbt project: static price component
This commit is contained in:
parent
e23afdab6f
commit
d0f8cd771e
|
@ -5,11 +5,12 @@
|
|||
*/dist/
|
||||
/11-single-price-grid-component/.bloop/
|
||||
|
||||
*/project/project/
|
||||
*/project/metals.sbt
|
||||
*/project/.bloop
|
||||
*/project/target/
|
||||
*/target/
|
||||
**/.bloop
|
||||
**/project/project/
|
||||
**/project/metals.sbt
|
||||
**/project/.bloop
|
||||
**/project/target/
|
||||
**/target/
|
||||
|
||||
*/result
|
||||
result
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
version = "3.7.3"
|
||||
runner.dialect = scala3
|
|
@ -0,0 +1,20 @@
|
|||
ThisBuild / scalaVersion := "3.2.2"
|
||||
fork := true
|
||||
|
||||
ThisBuild / version := "0.0.1"
|
||||
ThisBuild / organization := "industries.sunshine"
|
||||
|
||||
val toolkitV = "0.1.7"
|
||||
val toolkit = "org.scala-lang" %% "toolkit" % toolkitV
|
||||
val toolkitTest = "org.scala-lang" %% "toolkit-test" % toolkitV
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
name := "order-summary-component",
|
||||
libraryDependencies += toolkit,
|
||||
libraryDependencies += (toolkitTest % Test),
|
||||
libraryDependencies ++= Seq(
|
||||
"com.lihaoyi" %% "cask" % "0.9.1",
|
||||
"com.lihaoyi" %% "mainargs" % "0.5.0"
|
||||
)
|
||||
)
|
|
@ -0,0 +1 @@
|
|||
sbt.version=1.9.0
|
|
@ -0,0 +1,20 @@
|
|||
package example
|
||||
|
||||
import mainargs.{main, arg, ParserForMethods}
|
||||
|
||||
object Main {
|
||||
@main def run(
|
||||
@arg(
|
||||
name = "post",
|
||||
short = 'p',
|
||||
doc = "Port on which server will start serving."
|
||||
)
|
||||
portArg: Int = 8080,
|
||||
@arg(name = "host", doc = "Host on which server will start serving.")
|
||||
hostArg: String = "localhost"
|
||||
): Unit =
|
||||
println(s"Will start server on ${hostArg}:${portArg}")
|
||||
|
||||
def main(args: Array[String]): Unit = ParserForMethods(this).runOrExit(args)
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package example
|
||||
|
||||
class ExampleSuite extends munit.FunSuite:
|
||||
|
||||
test("addition") {
|
||||
assert(1 + 1 == 2)
|
||||
}
|
||||
end ExampleSuite
|
Loading…
Reference in New Issue