lms-sandbox icon indicating copy to clipboard operation
lms-sandbox copied to clipboard

create a file extension (maybe .scalajs?) which acts like build.sbt, setting up a file to be the scalajs DSL

Open jstrachan opened this issue 12 years ago • 0 comments

So it'd have default imports of some package objects/Predef type constructs.

e.g.

// Foo.scalajs package foo

def blah(x: Int) = x * 2

class Whatnot(val y: String) { def thingy = "Hello " + y }

which then pseudo-generates something like this from the perspective of Scala IDE / sbt...

// Foo.scala package foo

import scalajs._

def blah(x: Int) = x * 2

class Whatnot(val y: String) { def thingy = "Hello " + y }

which then aliases things like scalajs.Int => scala.js.Rep[Int] etc

jstrachan avatar Nov 03 '11 09:11 jstrachan