Commit be0f6695 authored by TasteBot's avatar TasteBot

update the build files for gh-pages [ci skip]

parent 8c4053d8
......@@ -23,7 +23,8 @@ indexHtml := {
<body>
<script type="text/javascript" src="node_modules/todomvc-common/base.js"></script>
<script type="text/javascript" src={ linkedJs.file.relativeTo(baseDirectory.value).get.toString }></script>
<script type="text/javascript"> com.thoughtworks.todo.Main().main() </script>
<div id="application-container"></div>
<script type="text/javascript"> com.thoughtworks.todo.Main().main(document.getElementById('application-container')) </script>
</body>
</html>
val outputFile = baseDirectory.value / "index.html"
......
......@@ -9,6 +9,7 @@
<body>
<script type="text/javascript" src="node_modules/todomvc-common/base.js"></script>
<script type="text/javascript" src="js/js-opt.js"></script>
<script type="text/javascript"> com.thoughtworks.todo.Main().main() </script>
<div id="application-container"></div>
<script type="text/javascript"> com.thoughtworks.todo.Main().main(document.getElementById('application-container')) </script>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,7 +3,7 @@ package com.thoughtworks.todo
import com.thoughtworks.binding.{Binding, dom}
import com.thoughtworks.binding.Binding.{BindingSeq, Constants, Var, Vars}
import scala.scalajs.js.annotation.JSExport
import org.scalajs.dom.{document, Event, KeyboardEvent, window}
import org.scalajs.dom.{Event, KeyboardEvent, window}
import org.scalajs.dom.ext.{KeyCode, LocalStorage}
import org.scalajs.dom.raw.{HTMLInputElement, Node}
import upickle.default.{read, write}
......@@ -129,7 +129,7 @@ import upickle.default.{read, write}
<ul class="filters">{
for { todoList <- Constants(todoLists: _*) } yield {
<li>
<a href={ todoList.hash } class={ if (todoList == currentTodoList.bind) "selected" else "" }>{ todoList.text }</a>
<a href={ todoList.hash } class={ if (todoList == currentTodoList.bind) "selected" else "" }>{ todoList.text }</a>
</li>
}
}</ul>
......@@ -140,7 +140,7 @@ import upickle.default.{read, write}
</footer>
}
@dom def todoapp: Binding[BindingSeq[Node]] = {
@JSExport @dom def todoapp: Binding[BindingSeq[Node]] = {
<section class="todoapp">{ header.bind }{ mainSection.bind }{ footer.bind }</section>
<footer class="info">
<p>Double-click to edit a todo</p>
......@@ -149,6 +149,6 @@ import upickle.default.{read, write}
</footer>
}
@JSExport def main() = dom.render(document.body, todoapp)
@JSExport def main(container: Node) = dom.render(container, todoapp)
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment