Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mads-hartmann/504486 to your computer and use it in GitHub Desktop.
Save mads-hartmann/504486 to your computer and use it in GitHub Desktop.
package com.sidewayscoding
import sbt._
import org.lifty.engine._
// the processor
class Processor extends SBTTemplateProcessor {
def templates = MyTemplate :: Nil
}
// The template
object MyTemplate extends Template with Create {
def name = "hello"
def description = "Creates a file with a greeting in it"
def arguments = Argument("name") :: Nil
def files = TemplateFile(
"%s/greetings.ssp".format(GlobalConfiguration.rootResources),
"output/greetings/${name}.txt"
) :: Nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment