aboutsummaryrefslogtreecommitdiff
path: root/content/blog/2012-11-01-base-a-scala-project-generator.markdown
diff options
context:
space:
mode:
authorJulio Capote <jcapote@gmail.com>2023-01-24 03:20:47 +0000
committerJulio Capote <jcapote@gmail.com>2023-01-24 03:20:47 +0000
commitf24f2d15275961f1c0144e68fde75a60aeaaa165 (patch)
tree38be1626f3ade436fbd17eadb2753fa2f0effb37 /content/blog/2012-11-01-base-a-scala-project-generator.markdown
parentbf04383b34c4a4fdfe239de2805a30a051921002 (diff)
downloadcapotej.com-f24f2d15275961f1c0144e68fde75a60aeaaa165.tar.gz
move to bear theme
Diffstat (limited to 'content/blog/2012-11-01-base-a-scala-project-generator.markdown')
-rw-r--r--content/blog/2012-11-01-base-a-scala-project-generator.markdown40
1 files changed, 40 insertions, 0 deletions
diff --git a/content/blog/2012-11-01-base-a-scala-project-generator.markdown b/content/blog/2012-11-01-base-a-scala-project-generator.markdown
new file mode 100644
index 0000000..da4bab7
--- /dev/null
+++ b/content/blog/2012-11-01-base-a-scala-project-generator.markdown
@@ -0,0 +1,40 @@
+---
+title: "Base: A Scala Project Generator"
+date: 2012-11-01T14:39:00Z
+comments: true
+tags: ["efficiency", "scala", "shell scripting"]
+---
+
+Finally got tired of copy pasting other projects and gutting them to make new ones, so I created [base](http://github.com/capotej/base), a shell command that creates new scala projects.
+
+<!--more-->
+
+Creating the project:
+
+```sh
+$ base new com.capotej.newproj
+creating project: newproj
+ creating App.scala
+ creating AppSpec.scala
+ creating pom.xml
+ creating .gitignore
+ creating .travis.yml
+ creating LICENSE
+ creating README.markdown
+Done! run mvn scala:run to run your projec
+```
+
+Based on the package name, it infered that the project name is ```newproj``` and created the project under that folder. Let's build and run it:
+
+```sh
+$ cd newproj
+$ mvn compile scala:run
+(... maven output ...)
+hello world
+```
+
+This uses the new incremental compiler for maven, [zinc](http://github.com/typesafehub/zinc), which dramatically speeds up compile times (except for the first time you run it). It also sets you up with the latest scalatest maven plugin, which gives you sweet looking test output, like so:
+
+![](https://i.imgur.com/qyyem.png)
+
+See the base [README](http://github.com/capotej/base#readme) for installation instructions.