10

I am using sbt console to debug some web application, written with Lift Framework.

Every time running it, I run some commands to initialize framework.

import bootstrap.liftweb.Boot
(new Boot).boot
import ...some frequently used models from my app...

I want sbt to do this boilerplate every time I start it.

How to do this?

uhbif19
  • 3,139
  • 3
  • 26
  • 48

1 Answers1

8

The simple way to do that, is put "initialCommands" rule in build.sbt.

This example:

initialCommands in console := """println("Hello from console")"""

will print in console, after initialization

Hello from console

Provided by https://stackoverflow.com/a/12703977/225767

Community
  • 1
  • 1
uhbif19
  • 3,139
  • 3
  • 26
  • 48