“微型化”从源代码中删除多余的字符,如空白、新行和注释。 这通过减小代码大小来改进性能。 虽然细化不会影响功能,但会降低代码的可读性。
要为语义更改生成简化代码,请执行以下步骤。
从文件系统上的src-package复制client-html/src/main/webapp/js
。
有关包的详细信息,请参见自定义AEM Forms工作区简介。
main.js
中的更新路径(位于client-html/src/main/webapp/js下),用于添加/更新的型号/视图。
例如,添加新的Sharequeue模型(如mySharequeue),请更改:
sharequeuemodel : pathprefix + 'runtime/models/sharequeue',
收件人
sharequeuemodel : pathprefix + 'runtime/myModels/mySharequeue',
更新registry-config.xml, located at client-html/src/main/webapp/js/resource_generator,
,以防在main.js
中出现别名的更改/添加。
例如,添加新的Sharequeue模型(如mySharequeue),请更改:
<sharequeue
name="sharequeue"
path="runtime/models/sharequeue.js"
service="service"/>
收件人
<sharequeue
name="sharequeue"
path="runtime/myModels/mySharequeue.js"
service="service"/>
在client-html/src/main/webapp/js/minifier上,运行命令:
mvn clean install
它在client-html/src/main/webapp/js下生成一个文件夹minified-files,其中包含minifed main.js和registry.js。
缩小功能仅适用于64位JVM。
如果您是小型的,则升级会受到影响。