Skip to content

Commit

Permalink
Merge pull request #22 from XenonAbe/coffeescript2
Browse files Browse the repository at this point in the history
Upgrade to CoffeeScript 2
  • Loading branch information
mkurz committed Jan 12, 2024
2 parents b19806c + 9756fd2 commit 9173aea
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ developers += Developer(
addSbtJsEngine("1.3.5")

libraryDependencies ++= Seq(
"org.webjars" % "coffee-script-node" % "1.11.0",
"org.webjars.npm" % "coffeescript" % "2.7.0",
"org.webjars" % "mkdirp" % "0.5.0"
)

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/coffee.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

var args = process.argv,
fs = require("fs"),
coffeeScript = require("coffee-script"),
coffeeScript = require("coffeescript"),
mkdirp = require("mkdirp"),
path = require("path");

Expand Down
5 changes: 4 additions & 1 deletion src/sbt-test/sbt-coffeescript-plugin/coffee/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ checkMapFileContents := {
| "a.coffee"
| ],
| "names": [],
| "mappings": "AAAA;AAAA,MAAA;;EAAA,MAAA,GAAW;;EACX,QAAA,GAAW;AADX"
| "mappings": "AAAA;AAAA,MAAA,MAAA,EAAA;;EAAA,MAAA,GAAW;;EACX,QAAA,GAAW;AADX",
| "sourcesContent": [
| "number = 42\nopposite = true\n"
| ]
|}""".stripMargin) {
sys.error(s"Unexpected contents: $contents")
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
addSbtPlugin("com.github.sbt" % "sbt-coffeescript" % sys.props("project.version"))
sys.props.get("project.version") match {
case Some(x) => addSbtPlugin("com.github.sbt" % "sbt-coffeescript" % x)
case _ => sys.error("""|The system property 'project.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
}
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
addSbtPlugin("com.github.sbt" % "sbt-coffeescript" % sys.props("project.version"))
sys.props.get("project.version") match {
case Some(x) => addSbtPlugin("com.github.sbt" % "sbt-coffeescript" % x)
case _ => sys.error("""|The system property 'project.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
}

0 comments on commit 9173aea

Please sign in to comment.