我正在为我的dojo应用程序创建自定义构建。我创建了以下profile.js:
var profile = {
basePath: "../../../",
releaseDir: "./releases/custom",
packages: ['dojo', 'dijit', 'dojox' ],
cssOptimize: 'comments',
mini: true,
optimize: 'comments',
layerOptimize: 'comments',
stripControle: 'all',
selectorEngine: 'lite',
layers : {
'dojo/dojo': {
include: ['dojo/dojo', 'dojo/domReady', 'dojo/_base/declare', "dojo/on", "dojo/dom-attr", "dojo/dom-class", "dojo/query", "dojo/_base/lang", "dojo/request/xhr", "dojo/parser", "dojo/_base/connect", "dojo/DeferredList", "dojo/store/Memory", "dojo/store/Observable"],
boot: true,
customBase: true
},
'dijit/dijit' : {
include: ["dijit/registry","dijit/form/TextBox", "dijit/form/Textarea", "dijit/form/ComboBox", "dijit/form/FilteringSelect", "dijit/form/CheckBox", "dijit/form/Button"],
boot: true,
customBase: true
},
},
}
dojo/dojo.js
已创建,但dijit/dijit.js
仅包含模板文字:
//>>内置
未定义;
但是,正确创建了文件dijit.js.uncompressed.js
(998 KB)。
为什么dojo构建表现如此?该配置中有什么错误? Dojo文档非常神秘。
- 编辑 -
指定输出文件似乎有问题。将'dijit / dijit'enter code here
更改为'dojo/dijit'
文件dijit.js
后,会在dojo
子目录中创建。如果我想使用自定义名称创建构建,我还需要在dojo
子目录中创建它。否则,将创建空文件(仅包含undefined;)
。