Skip to content

Commit

Permalink
Add example template without name. Resolves foundweekends#89
Browse files Browse the repository at this point in the history
  • Loading branch information
foxmk authored and eed3si9n committed Jun 29, 2017
1 parent 540ae87 commit 22862b2
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion library/src/main/scala/g8.scala
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ object G8 {
interact(defaults)
}

val base = outputFolder / parameters.get("name").map(G8.normalize).getOrElse(".")
val base = outputFolder / parameters.get("name").map(G8.normalize).getOrElse("")
val r = writeTemplates(templatesRoot,
templates,
parameters,
Expand Down
5 changes: 5 additions & 0 deletions plugin/src/sbt-test/giter8/without-name/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
scriptedBufferLog in (Test, g8) := false

ScriptedPlugin.scriptedLaunchOpts ++= sys.process.javaVmArguments.filter(
a => Seq("-Xmx", "-Xms", "-XX").exists(a.startsWith)
)
1 change: 1 addition & 0 deletions plugin/src/sbt-test/giter8/without-name/project/giter8.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("org.foundweekends.giter8" % "sbt-giter8" % System.getProperty("plugin.version"))
3 changes: 3 additions & 0 deletions plugin/src/sbt-test/giter8/without-name/src/main/g8/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name := "Example SBT project"

scalaVersion := "2.11.5"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package=com.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=0.13.15
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package $package$

object Main extends App {
println("Hello from project without name")
}
1 change: 1 addition & 0 deletions plugin/src/sbt-test/giter8/without-name/test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
> g8Test

0 comments on commit 22862b2

Please sign in to comment.