几个月前,当我第一次发现webJars时,我非常怀疑,鉴于其中一些构建/构建系统的巨大复杂性,并考虑到频率,它将成为处理客户端依赖关系的可行方式。 js
文件已发布。第二个问题当然没有充分根据,但是我在第一次担心后,在花了近36个小时后现在试图徒劳地获得大约10 scss/css/less
-type webJars和8个JS webJars住在一个 jsDependencies
屋顶。
我发现当你达到JS依赖3,4或5时,你开始进入一个荒谬的timekill循环:
1.“哦,没有!fastOptJS失败了,因为有一些随机文件也被命名为webjar中的依赖项!”
[trace] Stack trace suppressed: run last client/compile:resolvedJSDependencies for the full output.
[error] (client/compile:resolvedJSDependencies) org.scalajs.core.tools.jsdep.JSLibResolveException: Some references to JS libraries could not be resolved:
[error] - Ambiguous reference to a JS library: bootstrap.min.js
[error] Possible paths found on the classpath:
[error] - META-INF/resources/webjars/bootstrap/3.3.6/js/bootstrap.min.js
[error] - META-INF/resources/webjars/bootstrap3-dialog/1.34.4/examples/assets/bootstrap/js/bootstrap.min.js
[error] originating from: client:compile, client:compile, client:compile, client:compile
[error] - Ambiguous reference to a JS library: bootstrap.js
[error] Possible paths found on the classpath:
[error] - META-INF/resources/webjars/bootstrap3-dialog/1.34.4/examples/assets/bootstrap/js/bootstrap.js
[error] - META-INF/resources/webjars/bootstrap/3.3.6/js/bootstrap.js
[error] originating from: client:compile, client:compile, client:compile, client:compile
我知道该怎么做!我将为定义的js添加一个版本!
lazy val webjarbs = "org.webjars" % "bootstrap" % version.bootstrap / s"${version.bootstrap}/bootstrap.js" minified s"${version.bootstrap}/bootstrap.min.js" dependsOn "jquery.js" commonJSName "bootstrap"
“哦,不!fastOptJS失败了!”
[trace] Stack trace suppressed: run last client/compile:resolvedJSDependencies for the full output.
[error] (client/compile:resolvedJSDependencies) org.scalajs.core.tools.jsdep.JSLibResolveException: Some references to JS libraries could not be resolved:
[error] - Missing JS library: 3.3.6/bootstrap.js
[error] originating from: client:compile, client:compile, client:compile, client:compile
[error] - Missing JS library: 3.3.6/bootstrap.min.js
[error] originating from: client:compile, client:compile, client:compile, client:compile
gg男孩。
这种情况一遍又一遍,然后我必须开始做
lazy val bs_sidebar = ( "org.webjars" % "bootstrap-sidebar" % version.bs_sidebar intransitive()) / "js/sidebar.js" dependsOn(s"bootstrap.js", s"bootstrap.min.js")
现在我甚至不是真的使用webjar,但它有一个 JS名为X的依赖,我无法改变...
题
嗯?如果我只是做了我以前做的事情但是在没有应用程序的情况下将依赖关系构建到一些巨大的文件或文件集中,然后将其提供给构建中,该怎么办?我有一个在线概念证明,我得到了它的工作(我认为它是 https://github.com/wav/material-ui-scalajs-react/blob/master/src/main/scala/wav/web/muiwrapper/package.scala )几乎工作,并给了我这个想法。
我知道 npm
工作得比很好 sbt,
我仍然可以把它放进我的包里......有什么缺点,而且 我错过了一些关于sbt的事情?