0.0.11 • Published 9 years ago

ember-cli-scala v0.0.11

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

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

Scala Build Tool (sbt)

brew install sbt

Todo

  • Tests

License

MIT