开发者

Optimize non-layered files in dojo build

开发者 https://www.devze.com 2022-12-10 08:45 出处:网络
How do I tell the dojo 开发者_运维百科build system to run the shrinksafe optimization on files NOT includedin a layer but in the perfixes directories?

How do I tell the dojo 开发者_运维百科build system to run the shrinksafe optimization on files NOT included in a layer but in the perfixes directories?

Thanks


There are two optimization parameters for custom builds: optimize and layerOptimize. In your case, you would need to set optimize=shrinksafe.

  • optimize Specifies how to optimize module files. If "comments" is specified, then code comments are stripped. If "shrinksafe" is specified, then the Dojo compressor will be used on the files, and line returns will be removed. If "shrinksafe.keepLines" is specified, then the Dojo compressor will be used on the files, and line returns will be preserved. If "packer" is specified, Then Dean Edwards' Packer will be used Default: "",

  • layerOptimize Specifies how to optimize the layer files. If "comments" is specified, then code comments are stripped. If "shrinksafe" is specified, then the Dojo compressor will be used on the files, and line returns will be removed. If "shrinksafe.keepLines" is specified, then the Dojo compressor will be used on the layer files, and line returns will be preserved. If "packer" is specified, Then Dean Edwards' Packer will be used Default: "shrinksafe",


You need to declare the folder that contains the files to optimise as a package in the build profile so that it can be optimised.

packages: [
{
    name:"dojo",
    location:"dojo"
},
{
    name:"filesToOptimise",
    location:"folderLocation"
}
]

Make sure you have a profile.js and package.json in that directory and optimize:"shrinksafe" option in your build profile as well.

0

精彩评论

暂无评论...
验证码 换一张
取 消