Login Register

Custom builds and getting one file with it all - a newbie question

Hi!

I want to have a build with all my widgets etc. I've tried to copy all my dojo.require() into the following but I think I'm missing something vital...

dependencies ={
    layers:  [
        {
        name: "test.js",
        dependencies: [
            "dijit.Button",
            "dijit.Tooltip",
            "dojo.parser",
            "dojo.date.locale",
            "dijit.layout.AccordionContainer",
            "dijit.layout.ContentPane",
            "dojox.layout.ContentPane",
            "dijit._Container",
            "dijit._Templated",
            "dijit.from.NumberSpinner",
            "dijit.form.DateTextBox",
            "dijit.form.Form",
            "dijit.InlineEditBox",
            "dijit.TitlePane",
            "dojo.fx",
            "dijit.Toolbar",
            "dijit.Meny",
            "dojox.widget.FisheyeList"
        ]
        }
    ],
    prefixes: [
        [ "dijit", "../../dijit" ],
        [ "dojox", "../../dojox" ],
        [ "dojo", "../../dojo" ]
    ]
};

Well it looks correct in

Well it looks correct in general, except that dijit.Meny is probably a typo. What is the error you are getting when you try to create the build?

It complains that the

It complains that the Tooltip isn't found and I can't find it when I search the output test.js. I haven't tested everything yet.

Ahh... found it. Should

Ahh... found it. Should be:

....
    prefixes: [
        [ "dijit", "../dijit" ],
        [ "dojox", "../dojox" ],
        [ "dojo", "../../dojo" ]
    ]...

Beyond logic for me...

I agree the pathing thing

I agree the pathing thing probably needs more explanation. Here is a short try at it: you do not need to include dojo in the prefixes array -- by default, the build system assumes the dojo directory to be in a sibling directory to the util directory. The paths for the prefixes need to relative to that dojo directory.

Thanks for the explanation.

Thanks for the explanation. Should as you say be in the docs. It would also be nice how to make the distribution smaller, skip all the parts that I'm not using.

Issue with including dojo.js in layer

Hi!

I have the following issue:

I `ve got to include in my custom layer the dojo.js which contains base dojo functionality.
This file (dojo.js) is generated every time when I create a custom build. It`s located: dojo_root_directory/release/dojo/dojo/dojo.js if I create a build using base.profile.js and building parameters with default values. When I try to refer to the dojo.js in my profile (in the “dependencies” section) different errors occur in time of building. Is it possible to include the dojo.js in the layer?

Thanks

I'm not sure I follow the

I'm not sure I follow the question. When you create a build profile, any layer you create has an implicit dependency on the dojo.js layer. If you want to include some of your modules with the Dojo Base modules, then name the first layer in your build file "dojo.js". Then in the dependencies array for that layer, list the other modules you want to include.

Once the build is done, dojo_root_directory/release/dojo/dojo/dojo.js will include the Dojo Base modules as well as any modules you listed in the dependencies array for the "dojo.js" layer.

It works. You really helped

It works. You really helped me. Thanks.