I can use jQuery from Scala.js quite well:
jsDependencies += "org.webjars" % "jquery" % "2.2.1" / "jquery.js" minified "jquery.min.js"
Now I would like to use UglifyJS and its webjar structure seems a bit different. There seems to be no minified js file, and even the main file which probably contains the complete library looks different, it has no .js
extension and it starts with following lines:
#! /usr/bin/env node
// -*- js -*-
"use strict";
var UglifyJS = require("../tools/node");
Can this webjar be used from Scala.js at all, and if it can, how? I have tried following, but it did not work:
jsDependencies += "org.webjars" % "uglifyjs" % "2.7.4" / "bin/uglifyjs"
With this line SBT error was:
[error] (test:resolvedJSDependencies) org.scalajs.core.tools.jsdep.JSLibResolveException: Some references to JS libraries could not be resolved:
[error] - Missing JS library: bin/uglifyjs
[error] originating from: scalafromjs:test, scalafromjs:compile