忽略"styles.scss.cache"文件以进行Vaadin 8.1项目中的版本控制吗? [英] Ignore 'styles.scss.cache' file for version control in a Vaadin 8.1 project?

查看:75
本文介绍了忽略"styles.scss.cache"文件以进行Vaadin 8.1项目中的版本控制吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用vaadin-archetype-widget Maven原型创建的新Vaadin 8.1项目中完成第一个Maven install之后,首先运行我的应用程序,我注意到出现了一个新文件:

After doing the first Maven install on my new Vaadin 8.1 project created from the vaadin-archetype-widget Maven archetype, and first running my app, I noticed a single new file appeared:

myproject-demo/src/main/webapp/VAADIN/themes/demo/styles.scss.cache

myproject-demo/src/main/webapp/VAADIN/themes/demo/styles.scss.cache

➠从我的版本控制中包含或忽略此文件有意义吗?

➠ Does it make sense to include or ignore this file from my version control?

通过 ignore ,我的意思是将该文件名添加到我的文件/文件夹列表中,从而被版本控制系统忽略. (.hgignore文件)

By ignore, I mean add that filename to my list of file/folders to big ignored by my version control system. (.hgignore file)

如果我打算以开源形式共享此项目,是否应包括此文件以在构建过程中保存步骤?还是经常重建它,以至于频繁的更改会很烦人,并且不必要地标记不相关的更改,所以我应该忽略它?

If I intend to share this project as open-source, should I include this file to save a step during build? Or does it get rebuilt frequently, so it would be annoying with frequent changes and needlessly flag an irrelevant change, so I should ignore it?

使用 Mercurial 进行版本控制.

推荐答案

您可以忽略styles.scss.cache.它是由Vaadin Servlet首次编译您的样式后生成的.缓存条目由

You can ignore styles.scss.cache. It is generated by the Vaadin servlet after it compiles your style for the first time. Cache entry is controlled by VaadinServlet on row 1107 and it will be good to let the server to create and invalidate this file when necessary.

即时进行SCSS编译可以正常工作,但是如果发现它太慢",则可以使用maven将主题编译为平面styles.css文件.例如,Vaadin正在将Valo主题编译到vaadin-themes库中,您可以从您的主题中做类似的人工制品.有关更多详细信息,请参见 Vaadin主题文档.

On the fly compilation of SCSS works fine but if that turns out to be "too slow" you can compile your theme to flat styles.css file with maven. For example, Vaadin is compiling Valo theme into vaadin-themes library and you could do similar artefact from your theme. See Vaadin theme documentation for more details.

这篇关于忽略"styles.scss.cache"文件以进行Vaadin 8.1项目中的版本控制吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆