Skip to content

Commit

Permalink
Merge pull request #80 from tuplejump/develop
Browse files Browse the repository at this point in the history
release 0.8.1
  • Loading branch information
Shiti committed Jul 14, 2015
2 parents b26d1d4 + f29e72a commit b32d3e6
Show file tree
Hide file tree
Showing 53 changed files with 1,708 additions and 468 deletions.
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The play-compatible-version depends on the version of Playframework being used,
|---------------------------|--------------------|--------------|
| 2.2.x | 0.6.4 | 2.10 |
| 2.3.x | 0.7.1 | 2.10, 2.11 |
| 2.4.x | 0.8.0 | 2.11 |
| 2.4.x | 0.8.1 (support for injected routes generator) | 2.11 |


3) Import Yeoman classes in the project build adding the following import to `project/Build.scala`,
Expand Down Expand Up @@ -107,6 +107,22 @@ play.Project.playJavaSettings ++ Yeoman.yeomanSettings

```

Using 0.7.1 or greater

```
import com.tuplejump.sbt.yeoman.Yeoman
name := "play-project"
version := "1.0-SNAPSHOT"
scalaVersion := "2.x.x"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
Yeoman.yeomanSettings ++ Yeoman.withTemplates
```

5) Add yeoman routes to the project, appending the following line in conf/routes files,

```
Expand All @@ -126,6 +142,9 @@ GET / com.tuplejump.playYeoman.Yeoman.redirectRoot(base="/ui/")
```

If using, Play's injected routes generator, prefixing the route with `@` will work except for `yeoman.Routes`. It can be used as is.


6) Start play/sbt in your project folder,

```
Expand Down Expand Up @@ -233,7 +252,7 @@ Using >= 0.7.1

* Once that is done play will compile the templates from yeoman directory too, and you can use them in your controllers. This helps you keep all your UI files together under the yeoman directory ('ui' by default)

* Look at the yo-demo project for details!
* Look at the yo-demo and yo-injection-demo projects for details!

Note: Starting from 0.7.1, play-yeoman supports compilation of views from the yeoman directory but cannot recompile them when they are modified with the server running. You will need to stop the server and start it again.

Expand All @@ -254,7 +273,6 @@ For this purpose play-yeoman provides 2 settings that you can use in you play pr

2) yeoman.devDirs - This is a List of String that takes a list of locations where play-yeoman should look for files in development mode i.e. when run using sbt run.


Note: Starting from 0.7.1, it is possible to disable force option on execution of grunt tasks. This can be done by adding the following to the application build settings,

```
Expand Down
4 changes: 4 additions & 0 deletions notes/0.8.1.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
New in this release

+ Support for using Play's injected routes generator.
+ updated default value for devDirs to include 'ui'. (related to #78)
5 changes: 1 addition & 4 deletions play-yeoman/README
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
This is your new Play 2.1 application
=====================================

This file will be packaged with your application, when using `play dist`.
This application provides the controllers for the plugin
13 changes: 12 additions & 1 deletion play-yeoman/app/com/tuplejump/playYeoman/Yeoman.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,23 @@ object Yeoman extends Controller {

}

/**
* Class added to support injected route generator (Play 2.4 onwards)
*/
class Yeoman extends Controller {
def index = Yeoman.index

def redirectRoot(base: String = "/ui/") = Yeoman.redirectRoot(base)
}

object DevAssets extends Controller {
// paths to the grunt compile directory or else the application directory, in order of importance
val runtimeDirs = Play.configuration.getStringList("yeoman.devDirs")
val basePaths: List[java.io.File] = runtimeDirs match {
case Some(dirs) => dirs.asScala.map(Play.application.getFile _).toList
case None => List(Play.application.getFile("ui/.tmp"), Play.application.getFile("ui/app"))
case None => List(Play.application.getFile("ui/.tmp"), Play.application.getFile("ui/app"),
//added ui to defaults since the newer projects have bower_components in ui directory instead of ui/app/components
Play.application.getFile("ui"))
}

/**
Expand Down
9 changes: 4 additions & 5 deletions play-yeoman/project/Build.scala
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import play.sbt.PlayScala
import sbt.Keys._
import sbt._
import Keys._
import play.Play.autoImport._
import PlayKeys._

object ApplicationBuild extends Build {

val appName = "play-yeoman"
val appVersion = "0.8.0"
val appVersion = "0.8.1"

val appDependencies = Seq(
// Add your project dependencies here,
//jdbc,
//anorm
)

val main = Project(appName, file(".")).enablePlugins(play.PlayScala).settings(
val main = Project(appName, file(".")).enablePlugins(PlayScala).settings(
version := appVersion,
libraryDependencies ++= appDependencies,
// Add your own project settings here
Expand Down
246 changes: 0 additions & 246 deletions sbt-yeoman/activator

This file was deleted.

Binary file removed sbt-yeoman/activator-launch-0.1.1.jar
Binary file not shown.
Loading

0 comments on commit b32d3e6

Please sign in to comment.