Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added template project. Shortened readme.

  • Loading branch information...
commit c098d04c58dcae93c528bad6cf87220329c37e26 1 parent 7e759c1
Paul Phillips authored
3  .gitignore
@@ -5,4 +5,5 @@ target
5 5
 lib_managed
6 6
 src_managed
7 7
 /ext
8  
-.lib
  8
+.lib
  9
+/template-project/project/boot
22  README.md
Source Rendered
@@ -100,23 +100,15 @@ Current -help output:
100 100
     shows precedence: JAVA_OPTS lowest, command line options highest.
101 101
 
102 102
 
103  
-## Template project
  103
+## Template project ##
104 104
 
105  
-To gain access to the awesome, simply add the following <project>/project/plugins/project/Build.scala file:
  105
+To see the plugin in action, including the thrilling custom sbt command "help-names":
106 106
 
107  
-    import sbt._
108  
-    object PluginDef extends Build {
109  
-      override def projects = Seq(root)
110  
-      lazy val root = Project("plugins", file(".")) dependsOn(extras)
111  
-      lazy val extras = uri("git://github.com/jsuereth/sbt-extras")
112  
-    }   
  107
+    cd template-project && ../sbt -sbt-rc help-names
  108
+    
  109
+The template files are:
113 110
 
114  
-Now to continue the amazement, simply extend the TemplateBuild trait in your project.   For example, in your
115  
-<project>/project/Build.scala file add:
116  
-
117  
-    import sbt._
118  
-    import template.TemplateBuild
119  
-
120  
-    object MyAwesomeBuild extends TemplateBuild {}
  111
+    project/plugins/project/Build.scala   # you can use this as-is if you want
  112
+    project/Build.scala                   # this is a starting point for your real Build.scala
121 113
 
122 114
 The Template build isn't quite finished.  There will most likely be a build.sbt DSL variant that does not require a project scala file.
4  template-project/project/Build.scala
... ...
@@ -0,0 +1,4 @@
  1
+import sbt._
  2
+import template.TemplateBuild
  3
+
  4
+object MyAwesomeBuild extends TemplateBuild {}
7  template-project/project/plugins/project/Build.scala
... ...
@@ -0,0 +1,7 @@
  1
+import sbt._
  2
+
  3
+object PluginDef extends Build {
  4
+  override def projects = Seq(root)
  5
+  lazy val root = Project("plugins", file(".")) dependsOn(extras)
  6
+  lazy val extras = uri("git://github.com/paulp/sbt-extras")
  7
+}   

0 notes on commit c098d04

Josh Suereth

Hey, love the new template project, great idea (for testing I had one locally). I think this documentation might still be useful for folk who don't know how to have SBT pull a plugin from source, unless you plan to publish it. I was hoping to get a few people trying out the DSL to see if they like it.

Josh Suereth

BTW - It's not a huge deal since you have the copy-able plugins/project/Build.scala. I just try to look out for other copy-paste programmers, so keeping paste-able code close at hand is good :)

Paul Phillips
Please sign in to comment.
Something went wrong with that request. Please try again.