-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jto
committed
Jul 9, 2012
1 parent
8b8cc33
commit 9d89e39
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,45 @@ | |||
g8-scaffold | |||
====== | |||
|
|||
g8-scaffold add code generation abilities to giter8, after a project has been generated. | |||
|
|||
Installation | |||
------------ | |||
|
|||
You need to add the plugin to your sbt project, in `project/plugins.sbt` | |||
|
|||
```scala | |||
addSbtPlugin("net.databinder.giter8" % "giter8-scaffold" % "0.4.6-SNAPSHOT") | |||
``` | |||
|
|||
Usage | |||
----- | |||
|
|||
giter8 expects scaffold templates to live into `src/main/scaffolds` in the original g8 template. | |||
|
|||
Scaffolding files will be copied into the `.g8` folder of your project. | |||
|
|||
Generating code | |||
----- | |||
|
|||
In the sbt console type: | |||
|
|||
```scala | |||
g8-scaffold <scaffold_name> | |||
``` | |||
|
|||
The name of the scaffold is the name of the folder located directly under `.g8` | |||
|
|||
Assuming you `.g8` folder has the following structure: | |||
|
|||
``` | |||
.g8 | |||
|_ model | |||
|_ view | |||
|_ controller | |||
``` | |||
|
|||
You have 3 different scaffodings available. | |||
|
|||
To generate a new template, just type `g8-scaffold model`. | |||
As usual, g8 will ask for the variable values, and generate the correct code. |