How to exclude files from Dojo's Build System?

*爱你&永不变心* 提交于 2019-12-04 16:41:47

I'm not sure what is wrong with my initial scenario but here are the changes that I made to have the desired result:

  1. Move the trees declaration from the myapp.profile.js to all.profile.js inside the 'myapp' package definition.
  2. Instead of specifying the root of the trees, check everything and exclude accordingly: [".", ".", /(\/\.)|(~$)|(test|txt)/]

The final all.profile.js:

var profile = {
    basePath: "./",
    releaseDir: "../web",
    releaseName: "built",
    action: "release",
    layerOptimize: "closure",
    optimize: "closure",
    cssOptimize: "comments",
    mini: true,
    stripConsole: "all",

    packages: [
        {
            name: "myapp",
            location: "myapp",
            trees: [
                // don't bother with .hidden, tests and txt.
                [".", ".", /(\/\.)|(~$)|(test|txt)/]
            ]
        }
    ]
};

If anyone can pin point exactly what I was doing wrong, please share.

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