Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building cometd into a custom Dojo build #4

Open
rich-frost opened this issue Mar 13, 2013 · 11 comments
Open

Building cometd into a custom Dojo build #4

rich-frost opened this issue Mar 13, 2013 · 11 comments

Comments

@rich-frost
Copy link

I'm struggling to see how we can include the cometd code in a custom build process for Dojo 1.8, can you give any suggestions? Your README doesn't cover it.

I've added the following to a build profile, it builds, but it doesn't include it in the layer file.

packages:[ 
       {name: "dojox/cometd", location: "../cometd-dojo/cometd"},
       {name: "org/cometd", location: "../cometd-dojo/org/cometd"),

.....
.....
]

@stemey
Copy link

stemey commented Aug 8, 2013

I have the same issue. But my profile looks like this:

dependencies = {

layers: [{
    name: "../app/restclient.js",
    dependencies: [
                    "app/ServiceController"
    ]
}
,
prefixes: [
    [ "dojox/cometd", "../cometd-dojo/cometd" ],
    [ "org/cometd", "../cometd-dojo/org/cometd" ],
    [ "dijit", "../dijit" ],
    [ "gridx", "../gridx" ],
    [ "dojox", "../dojox" ],
    [ "gform", "../gform" ],
            [ "app", "../app" ]
]

};

The issue seems to be, that only top level modules may be mapped.

@rich-frost
Copy link
Author

Did you manage to find a resolution to this? Thanks

@stemey
Copy link

stemey commented Nov 6, 2013

I did not work on the issue. But I think that the project layout simply does not permit a proper build.

@sbordet
Copy link
Member

sbordet commented Nov 6, 2013

I don't use/know the Dojo build system; I was told to put things in the current layout by Dojo guys, and they were happy with the result.

I am all for modifying things if they don't work, but I need help/guidance on how to modify things.

Thanks

@stemey
Copy link

stemey commented Nov 7, 2013

I am also not an authority in the field, soI asked on the dojo mailing list for support.

@clmath
Copy link

clmath commented Nov 7, 2013

I think the paths config should be used for that.
Try adding something like that in your build profile:

paths: { 
     'dojox/cometd': '../cometd-dojo/cometd' , 
     'org/cometd': '../cometd-dojo/org/cometd' 
}

@stemey
Copy link

stemey commented Nov 7, 2013

What's the difference to the prefixes that I added. Those are meant for aliasing but only support laiasing of top-level modules.

@rich-frost
Copy link
Author

clmath - I've tried adding in the paths to the build profile - but doesn't seem to notice/pickup the configuration.

@sbordet
Copy link
Member

sbordet commented Nov 11, 2013

@stemey if you get an answer in the Dojo ML, please report it here. Thanks !

@rich-frost
Copy link
Author

I've not been able to find a way to get paths to work within a Dojo build. When developing an application in its un-built state it seems fine to use paths. For the build process however it seems paths/alias's don't register, so when the packages are pulled in they can't resolve the location of the alternative directories/files. I feel there must be something within the build profile that would do this, but I haven't had any luck finding anything and not had any responses on Dojo ML.

Subsequently, my work-around has been to overwrite the Dojo dojox code to include the cometd/ folder and cometd.js file (https://github.com/dojo/dojox/blob/master/cometd.js), and put the org/ folder at the same level as dojox/

This way I can at least get it building properly.

@stemey
Copy link

stemey commented Nov 14, 2013

clmath's comment is the only feedback from the mailing list.

One possible solution is to change the module names to top-level names. Something like this:

paths: {
'cometd': '../cometd-dojo/cometd' ,
'comet-org': '../cometd-dojo/org/cometd'
}

Also, there are a lot of global objects. Convertinhg all the code to AMD would be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants