我在DOJO中创建自定义构建。我需要在build文件夹中保留dojoConfig.js文件而不是缩小。
目前我正在尝试:
- 使用miniExclude
从构建中排除dojoConfig.js,这工作正常
- 在copyOnly
之后最终构建没有压缩的dojoConfig.js,这不起作用。
我需要在build foler中复制dojoConfig.js。
我的个人资料中有什么问题吗?
miniExclude: function(o, e) {
return e in {
"aaa/aaa.profile": 1,
"aaa/dojoConfig": 1
}
},
copyOnly: function(o, e) {
return e in {
"aaa/dojoConfig": 1
}
}
var profile = function() {
return {
basePath: "../",
releaseDir: "dist",
releaseName: "build",
optimize: "closure",
action: "release",
layerOptimize: "closure",
copyTests: !1,
stripConsole: "all",
version: "0.0.0",
cssOptimize: "comments",
mini: !0,
copyTests: !1,
useSourceMaps: !1,
staticHasFeatures: {
"config-dojo-loader-catches": 0,
"config-tlmSiblingOfDojo": 0,
"dojo-amd-factory-scan": 0,
"dojo-combo-api": 0,
"dojo-config-api": 1,
"dojo-config-require": 0,
"dojo-debug-messages": 0,
"dojo-dom-ready-api": 1,
"dojo-firebug": 0,
"dojo-guarantee-console": 1,
"dojo-has-api": 1,
"dojo-inject-api": 1,
"dojo-loader": 1,
"dojo-log-api": 0,
"dojo-modulePaths": 0,
"dojo-moduleUrl": 0,
"dojo-publish-privates": 0,
"dojo-requirejs-api": 0,
"dojo-sniff": 1,
"dojo-sync-loader": 0,
"dojo-test-sniff": 0,
"dojo-timeout-api": 0,
"dojo-trace-api": 0,
"dojo-undef-api": 0,
"dojo-v1x-i18n-Api": 1,
"dojo-xhr-factory": 0,
dom: 1,
"host-browser": 1,
"extend-dojo": 1
},
resourceTags: {
amd: function(o) {
return /\.js$/.test(o)
},
miniExclude: function(o, e) {
return e in {
"aaa/test.profile": 1,
"aaa/dojoConfig": 1
}
},
copyOnly: function(o, e) {
return e in {
"test/dojoConfig": 1
}
}
},
packages: [{
name: "dojo",
location: "dojo"
}, {
name: "test",
location: "test"
}],
layers: {
"dojo/dojo": {
include: ["dojo/dojo"],
customBase: !0,
boot: !0
},
"aaa/aaa-shared": {
include: ["test/shared/bootstrapShared"],
customBase: !0,
boot: !1
},
"aaa/aaa-content": {
include: ["test/content/bootstrap"],
customBase: !0,
boot: !1
},
"aaa/aaa-builder": {
include: ["test/builder/bootstrapBuilder"],
customBase: !0,
boot: !1
}
}
}
}();
答案 0 :(得分:1)
我不确定这是否是您的问题,但miniExclude
优先于copyOnly
,因此标记两者意味着它不会被包含在构建输出中默认情况下(因为mini: true
是默认值,您通常不想更改)。如果始终希望复制文件而不进行其他处理,请将其包含在copyOnly
中,而不是miniExclude
。