简体   繁体   English

Liferay中进行主题设计时,_diffs文件夹有什么需要?

[英]What is the need of _diffs folder while theme design in Liferay?

I know I can put some files into _diffs folder and these files will be placed up upon deploy . 我知道我可以将一些文件放入_diffs文件夹中,并且这些文件将在deploy放入。 But I can also edit files directly inside docroot and they will work too. 但是我也可以直接在docroot编辑文件,它们也可以工作。 Under Eclipse it is even more comfortable, since changing any file under docroot causes Eclipse to automatically update changed files on the running server -- no need to run long ant deploy target. 在Eclipse下,它更加舒适,因为更改docroot下的任何文件都会使Eclipse自动更新正在运行的服务器上的更改文件-无需运行长时间的ant deploy目标。

So what is the sense of _diffs folder? 那么_diffs文件夹的含义是_diffs And can I avoid using of it, either while standalone development or under Eclipse development? 我是否可以在独立开发或在Eclipse开发下避免使用它?

If you use the Liferay IDE plugins for eclipse (or Liferay Developer Studio), your theme will be transparently deployed even when you edit in _diffs (without restarting the webapplication - only the resources are copied to the appserver. 如果您将Liferay IDE插件用于Eclipse(或Liferay Developer Studio),则即使您在_diffs中进行编辑,主题也将透明部署(无需重新启动Web应用程序-仅将资源复制到应用服务器)。

The folder is used to decouple your changes from Liferay's changes. 该文件夹用于使您的更改与Liferay的更改脱钩。 The docroot folder contains hundreds of files (images, css, etc.) while your _diffs folder typically contains only a few files that differ from the default theme. docroot文件夹包含数百个文件(图像,css等),而_diffs文件夹通常仅包含几个与默认主题不同的文件。 This provides a massively better maintainability, as you know exactly what file you have changed - any update that Liferay delivers might come with additional defaults that you don't care about, so you might only need to recompile on a new SDK in order to upgrade to the next version. 正如您确切知道已更改的文件一样,这提供了更好的可维护性-Liferay提供的任何更新可能会附带您不关心的其他默认值,因此您可能只需要在新的SDK上进行重新编译即可进行升级到下一个版本。 In case changes are required, you'll only have to identify the single file of your changes that you'll have to adapt, instead of doing three-way merge between two Liferay versions and your changes. 如果需要更改,则只需标识必须适应的更改的单个文件,而无需在两个Liferay版本和您的更改之间进行三向合并。

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

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