Questions tagged «webjars»

1
在Play 2.3.x应用中使用sbt-rjs从WebJars优化JS
是否可以通过WebJars在我的应用程序中包含一个Play 2.3应用程序连接/优化JS(使用sbt-rjs)?举一个具体的例子:我正在尝试创建一个core.js模块,其中包含所有我的第3方库,这些库在一个文件中串联并缩小了,然后可以指定为其他AMD模块的依赖项。最好通过WebJars包含这些库,而不是“手动”下载源。 这是我的build.sbt文件中的一个片段,我在其中指定了我的webjar依赖项: // Webjars libraryDependencies ++= Seq( "org.webjars" % "requirejs" % "2.1.15", "org.webjars" % "underscorejs" % "1.7.0", "org.webjars" % "jquery" % "1.11.1", "org.webjars" % "bootstrap" % "3.3.1" exclude("org.webjars", "jquery"), "org.webjars" % "angularjs" % "1.3.4-1" exclude("org.webjars", "jquery") ) 这是我的requireJS构建配置 requirejs.config({ baseUrl: '/assets/javascripts', shim: { 'jsRoutes': { deps: [], exports: 'jsRoutes' …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.