Reputation: 143
I am trying to create a custom dojo build, using dojo sdk 1.10
I have the following directory structure -
app
build.profile.js
dojo
dijit
dojox
util
myapp
A.js
B.js
package.json
myapp.profile.js
both A.js and B.js are pure AMD modules. B is a dependency to A.
here is my myapp.profile.js -
var profile = (function(){
return {
resourceTags: {
amd : function(filename, mid) {
if(filename.indexOf('profile.js') != -1 && /\.js$/.test(filename))
return true;
else return false;
}
}
};
})();
here is my myapp package.json -
{
"name": "custom",
"description": "My Application.",
"version": "1.0",
"keywords": ["JavaScript", "Dojo", "Toolkit", "DojoX"],
"dojoBuild": "myapp.profile.js"
}
here is my applicatio wide build.profile.js -
var profile = (function(){
return {
basePath: ".",
releaseDir: "./build",
releaseName: "javascript",
action: "release",
stripConsole: "warn",
selectorEngine: "lite",
packages:[{
name: "dojo",
location: "dojo"
},{
name: "dijit",
location: "dijit"
},{
name: "dojox",
location: "dojox"
},{
name: "custom",
location: "myapp"
}],
layers: {
"dojo/dojo": {
include: [ "dojo/dojo", "dojo/i18n", "dojo/domReady"],
customBase: true,
boot: true
},
"custom/custom": {
include: ["myapp/A"]
}
}
};
})();
All configurations look okay, but when i build i get the following error : -
error(311) Missing dependency. module: myapp/A; dependency: myapp/B
here is my A.js :-
define([
"dojox/mobile/Badge",
"dijit/_Widget",
"myapp/B",
], function(declare, Button, Bb){
return declare("A", Button, {
});
});
here is my B.js :-
define([
"dojox/mobile/Badge",
"dijit/_Widget"
], function(declare, Button){
return declare("B", Button, {
});
});
is there something that I am missing in my profile objects? I am blocked here and not able to build my project.
Upvotes: 0
Views: 165
Reputation: 1387
In the packages section you have like this
{
name: "custom",
location: "myapp"
}],
Whereas, while loading the module you are using "myapp/A"
instead of "custom/A"
. Try changing that and let me know if it works.
Upvotes: 0