diff options
author | Noel Welsh <noel@Noels-MacBook-Pro.local> | 2016-05-24 14:59:33 +0100 |
---|---|---|
committer | Noel Welsh <noel@Noels-MacBook-Pro.local> | 2016-05-24 14:59:33 +0100 |
commit | 86e05110cc652c7c729672f58655a8e8585b072d (patch) | |
tree | ad68ace5a94f3719389966504bd228fd2871791c | |
parent | cd2fdddcf2bc76c91112ad8238463ba597d98814 (diff) | |
download | creative-scala-template-86e05110cc652c7c729672f58655a8e8585b072d.tar.gz creative-scala-template-86e05110cc652c7c729672f58655a8e8585b072d.tar.bz2 creative-scala-template-86e05110cc652c7c729672f58655a8e8585b072d.zip |
Initial import of template
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | build.sbt | 21 | ||||
-rw-r--r-- | src/main/scala/Example.scala | 12 |
3 files changed, 38 insertions, 0 deletions
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) +} |