2012-08-10 50 views
0

我使用sbt-js 0.3構建Scalatra Web項目。我在build.sbt中包含以下幾行。在戰爭中包含縮小的JavaScript文件

(webappResources in Compile) <+= (resourceManaged in Compile) 

(resourceGenerators in Compile) <+= (JsKeys.js in Compile) 

(compile in Compile) <<= compile in Compile dependsOn (JsKeys.js in Compile) 

當我運行compile縮小的文件確實會在target/scala_2.9.1文件夾中生成。但是當我使用package(來自xsbt-web-plugin)或assembly(來自sbt-assembly)時,我無法在戰爭中獲得這些文件。有任何想法嗎?

回答

1

看着xsbt-web-plugin它似乎默認從sourceDirectory/webapp複製並組裝在target/webapp中的所有東西。

我認爲你需要按照你所示的here(除非做一個拷貝而不是刪除)或重新配置以包含你的縮小JS到webappResResources設置。

相關問題