See https://github.com/sbt/sbt/wiki/sbt-1.x-plugin-migration for the list with sbt 1.x migration status.
plugin | star |
---|---|
playframework/playframework | 9597 |
scala-js/scala-js | 3053 |
sbt/sbt-assembly | 1092 |
mpeltonen/sbt-idea | 1085 |
import play.api.libs.json._ | |
import play.api.libs.functional.syntax._ | |
import play.api.data.validation._ | |
implicit def tuple2Reads[A, B](implicit aReads: Reads[A], bReads: Reads[B]): Reads[Tuple2[A, B]] = Reads[Tuple2[A, B]] { | |
case JsArray(arr) if arr.size == 2 => for { | |
a <- aReads.reads(arr(0)) | |
b <- bReads.reads(arr(1)) | |
} yield (a, b) | |
case _ => JsError(Seq(JsPath() -> Seq(ValidationError("Expected array of two elements")))) |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
// Make our app module, its easier to do this in raw javascript | |
// and then put the rest of our app content (controllers etc) | |
// in their own coffeescript files. | |
// | |
// Your ng-app should include this module name, eg: <html ng-app="TodoApp"> | |
angular.module('TodoApp', []); |
# Original source at: http://angularjs.org/#todo-js | |
window.TodoCtrl = ($scope) -> | |
$scope.todos = [ | |
{text: 'learn angular', done: true}, | |
{text: 'build an angular app', done: false} | |
] | |
$scope.addTodo = -> |
.done-true { | |
text-decoration: line-through; | |
color: grey; | |
} |
TodoCtrl = ($scope) -> | |
$scope.todos = [ | |
text: "learn angular" | |
done: true | |
, | |
text: "build an angular app" | |
done: false | |
] | |
$scope.addTodo = -> |
TodoCtrl = ($scope) -> | |
$scope.todos = [ | |
text: "learn angular" | |
done: true | |
, | |
text: "build an angular app" | |
done: false | |
] | |
$scope.addTodo = -> |
class TodoCtrl | |
constructor: ($scope) -> | |
$scope.todos = [ | |
text: "learn angular" | |
done: true | |
, | |
text: "build an angular app" | |
done: false | |
] |
class BaseCtrl | |
constructor: -> | |
console.log("All your base are belong to us!") | |
toJson: (item) -> | |
JSON.stringify(item) | |
class TodoCtrl extends BaseCtrl | |
constructor: (@$scope) -> | |
super |
See https://github.com/sbt/sbt/wiki/sbt-1.x-plugin-migration for the list with sbt 1.x migration status.
plugin | star |
---|---|
playframework/playframework | 9597 |
scala-js/scala-js | 3053 |
sbt/sbt-assembly | 1092 |
mpeltonen/sbt-idea | 1085 |