简体   繁体   English

在Webapp目录中更改静态文件(例如* .js或* .css)时,Scalatra livereload

[英]Scalatra livereload when changing static files such as *.js or *.css in the webapp dir

So after running the command recommended in Scalatras guides, at root dir: 因此,在运行Scalatras指南中建议的命令后,在根目录下:

$ sbt
> ~;jetty:stop;jetty:start

I get jetty to reload changes when I make changes in scala files, but if I make changes in js or css I must end jetty and relaunch the same command. 在scala文件中进行更改时,我得到码头来重新加载更改,但是如果在js或css中进行更改,则必须结束码头并重新启动相同的命令。

Is there anyway to improve this workflow? 无论如何,有没有改善这个工作流程? how to livereload also when files inside webapp ( *.js , *.css files) dir have been changed? webapp文件( *.js*.css文件)dir更改时,也如何进行livereload

Scalatra应该通过仅通过set ~jetty:start启动您的应用程序来重新加载webapp目录下的资源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM