ember-cli-scala
v0.0.11
Published
import Scala files compiled down to JavaScript with Scala.js into your Ember app.
Downloads
5
Readme
ember-cli-scala
import Scala files compiled down to JavaScript with Scala.js into your Ember.js app.
Install
ember install:addon ember-cli-scala
Usage
app/scala/Robot.scala
:
package robot
import scala.scalajs.js
import js.annotation.JSExport
@JSExport
object Robot {
@JSExport
def destroyHumans(num: Int = 10): String = {
"Destroying " + num + " humans."
}
}
Somewhere else in your code:
import Robot from 'namespace/scala/Robot.js';
var robot = Robot.Robot();
console.log(robot.destroyHumans(100)); // "Destroying 100 humans."
Dependencies
brew install sbt
Todo
- Tests
License
MIT