Liferay concatenate and compress javascript

*爱你&永不变心* 提交于 2019-12-04 09:08:01

Override the javascript.bundle.dependencies= and javascript.bundle.ids= properties in portal-ext.properties, see http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/javascri-3

Something like this:

javascript.my.files =\  
   jquery-1.8.3.js,\
   my-script.js

javascript.bundle.ids=\
   javascript.barebone.files,\
   javascript.everything.files,\
   javascript.my.files  


javascript.bundle.dependencies[javascript.barebone.files]=javascript.my.files

Furthermore, I don't think that the hook plugin is a right place for such requirements. My opinion the better way is to put the javascripts central to the theme.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!