Skip to content

Commit

Permalink
feat: extract aliases definition for the generated project to an isol…
Browse files Browse the repository at this point in the history
…ated file
  • Loading branch information
JavierCane committed Jun 22, 2024
1 parent f4909f4 commit be9ccbb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
lazy val root = (project in file("."))
.settings(
name := "Codely Scala Basic Skeleton",
version := "1.6.0",
version := "1.7.0",

organization := "com.codely",
organizationName := "Codely Enseña y Entretiene SL",
Expand Down
20 changes: 3 additions & 17 deletions src/main/g8/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,6 @@ Settings.settings

libraryDependencies := Dependencies.all


/** ********* COMMANDS ALIASES ******************/
addCommandAlias("t", "test")
addCommandAlias("to", "testOnly")
addCommandAlias("tq", "testQuick")
addCommandAlias("tsf", "testShowFailed")

addCommandAlias("c", "compile")
addCommandAlias("tc", "Test / compile")

addCommandAlias("f", "scalafmt") // Format production files according to ScalaFmt
addCommandAlias("fc", "scalafmtCheck") // Check if production files are formatted according to ScalaFmt
addCommandAlias("tf", "Test / scalafmt") // Format test files according to ScalaFmt
addCommandAlias("tfc", "Test / scalafmtCheck") // Check if test files are formatted according to ScalaFmt

// All the needed tasks before pushing to the repository (compile, compile test, format check in prod and test)
addCommandAlias("prep", ";c;tc;fc;tfc")
SbtAliases.aliases.flatMap { case (alias, command) =>
addCommandAlias(alias, command)
}
15 changes: 15 additions & 0 deletions src/main/g8/project/SbtAliases.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
object SbtAliases {
val aliases: Seq[(String, String)] = Seq(
"t" -> "test",
"to" -> "testOnly",
"tq" -> "testQuick",
"tsf" -> "testShowFailed",
"c" -> "compile",
"tc" -> "Test / compile",
"f" -> "scalafmt", // Format production files according to ScalaFmt
"fc" -> "scalafmtCheck", // Check if production files are formatted according to ScalaFmt
"tf" -> "Test / scalafmt", // Format test files according to ScalaFmt
"tfc" -> "Test / scalafmtCheck", // Check if test files are formatted according to ScalaFmt
"prep" -> ";c;tc;fc;tfc" // All the needed tasks before pushing to the repository (compile, compile test, format check in prod and test)
)
}

0 comments on commit be9ccbb

Please sign in to comment.