我正在使用游戏2.4我的播放应用程序工作正常然后我需要在安装这些组件后安装一些UI组件,如graunt
bower
ruby
compass
在activator run
之后reload clean compile
并点击localhost:9000加载页面需要将近半小时或更长时间,而在控制台上除了
--- (Running the application, auto-reloading is enabled) ---
[info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Ctrl+D to stop and go back to the console...)
我已经在这个主题的堆栈上查看了其他答案,但没有一个对我有用,请帮助
答案 0 :(得分:0)
请确保您的公用文件夹资料或node_modules不是 正在编译,因为如果他们将与您的应用程序编译 你会一直被困住。
您也可以按照以下步骤操作 - >
> stop play
> delete folder where your code compiles. There will be also a node_module folder that will be taking time too much.
> Again compile it with clean, but make sure in your compiled file, node modules folder is not being compiled.
在 build.sbt 中,(这只是一种做这些事情的方法,语法可能会在不同版本的播放框架中发生变化)
import play.sbt.PlayImport.PlayKeys.playRunHooks
lazy val gulpDirectory = baseDirectory {
_ / "admin-panel"
}
excludeFilter := HiddenFileFilter -- ".tmp"
unmanagedResourceDirectories in Assets <+= gulpDirectory { _ / "dist"}
unmanagedResourceDirectories in Assets <+= gulpDirectory { _ / ".tmp"}
unmanagedResourceDirectories in Assets <+= gulpDirectory { _ / "bower_components"}
//this is for development environment
unmanagedResourceDirectories in Assets <+= gulpDirectory { _ / "src" / "app"}
playRunHooks <+= gulpDirectory.map(path => Gulp(path))
如果这不起作用,我们也可以试试。
mappings in (Compile, packageBin) ~= { _.filterNot { case (_, name) =>
name.startsWith("public\\node_modules")
}}
您也可以访问链接
https://www.playframework.com/documentation/2.4.x/SBTCookbook