From 86e05110cc652c7c729672f58655a8e8585b072d Mon Sep 17 00:00:00 2001 From: Noel Welsh Date: Tue, 24 May 2016 14:59:33 +0100 Subject: Initial import of template --- README.md | 5 +++++ build.sbt | 21 +++++++++++++++++++++ src/main/scala/Example.scala | 12 ++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 README.md create mode 100644 build.sbt create mode 100644 src/main/scala/Example.scala diff --git a/README.md b/README.md new file mode 100644 index 0000000..d3e9111 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Creative Scala Template + +This is a template project designed for people taking [Creative Scala][creative-scala]. + +[creative-scala]: http://underscore.io/training/courses/creative-scala/ diff --git a/build.sbt b/build.sbt new file mode 100644 index 0000000..29c1070 --- /dev/null +++ b/build.sbt @@ -0,0 +1,21 @@ +scalaVersion := "2.11.8" + +resolvers += Resolver.bintrayRepo("underscoreio", "training") + +initialCommands in console := """ + |import doodle.core._ + |import doodle.core.Image._ + |import doodle.syntax._ + |import doodle.jvm.Java2DCanvas._ + |import doodle.backend.StandardInterpreter._ + |import doodle.examples._ + """.trim.stripMargin + +cleanupCommands in console := """ + |doodle.jvm.quit() + """.trim.stripMargin + +libraryDependencies ++= Seq( + "underscoreio" %% "doodle" % "0.6.1", + "org.typelevel" %% "cats" % "0.4.1" +) diff --git a/src/main/scala/Example.scala b/src/main/scala/Example.scala new file mode 100644 index 0000000..faa158a --- /dev/null +++ b/src/main/scala/Example.scala @@ -0,0 +1,12 @@ +import doodle.core._ +import doodle.core.Image._ +import doodle.syntax._ +import doodle.jvm.Java2DCanvas._ +import doodle.backend.StandardInterpreter._ + +// To use this example, open the SBT console and type: +// +// Example.image.draw +object Example { + val image = Circle(10) on Circle(20) on Circle(30) +} -- cgit v1.2.3