-
Notifications
You must be signed in to change notification settings - Fork 24
Description
I have been getting started with the play framework, and using this plugin to compile my coffeescript files. I have run into a problem with source maps, where the source mapping file is generated, but it doesnt contain the correct mappings, just 'undefined'. All I did was create a new scala play project using activator, set the node JS engine, and try it out with coffeescript. I have included the config files and the generated output below.
plugins.sbt
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.2")
// web plugins
addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.0.0")
build.sbt
name := """test"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.1"
JsEngineKeys.engineType := JsEngineKeys.EngineType.Node
libraryDependencies ++= Seq(
jdbc,
anorm,
cache,
ws
)
coffeescript file
class Foo
constructor: () -> console.log("Coffee Script File")
test.js: compile js file
(function() {
var Foo;
Foo = (function() {
function Foo() {
console.log("Coffee Script File");
}
return Foo;
})();
}).call(this);
//# sourceMappingURL=test.js.map
test.js.map: source mapping file
undefined