|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
xd builds, i18n, and then some moreThis is my folder structure:
index.html --js ----dojo (an external to dojo's svn) ------dojo ------dijit ------dojox ------utils ----myapp (contains the application code) ------nls ------more directories for widget namespaces, etc. ------themes (contains a theme we've customized, cloned originally from tundra) When I do a build, it creates a folder called release (by default) which is at the same level as dojo, dijit, dojox and utils folders. This means that in index.html, I now have to change paths to my css and js files. This is less than ideal. Is there any way we can do the build without having to change the references in the html file(s), so that it can be done by an automated script that checks out from our SVN? This is problem number 1. I wish the process above was simple, but it's further complicated when I do a build that needs i18n. Once built, this is the folder structure of the release folder: dojo --dijit --dojo --dojox --myapp (this contains all the application code) ----nls (this contains the original dev version of the i18n language packs, which is not ideal for deployment) --util myapp --nls (this contains the built version of the language packs) Because of this, copying over files from this location to the original directory structure is complicated if not impossible. How can this be fixed? I guess this is still problem number 1. Now for problem number 2. When I look at the built myapp.js file, it doesn't contain the language pack in it. (I have only created one language pack - root). This means that an extra (synchronous?) request has to be made to the server to get the language pack in production. This again is not ideal. Any way I can bake a build that contains the root language pack, and force dojo to not act upon the user's browser settings? This is problem number 2. Now, for experimentation, I changed the paths in my html anyway to see if the JS would all work anyway. Unfortunately, it did not. it makes a request to release/dojo/myapp/myscript_en_us.js. , which returns a 404 (obviously). I've seen a couple of forum entries about this, and I'm confident it's a misconfiguration I'm having in my build script, but I can't seem to find what it is. This is problem number 3. In production, I'd ideally want to load as much as possible from a CDN. However, this is not the ideal development setup - I'd prefer to have everything local with me. This ties into problem 1, but how do I have different paths to load from in development and production without having to modify my html file? This is problem 4, but I understand if this is hard to solve. Finally, between AOLs and Google's CDN's, which one would you recommend? Which one is likely to have more apps using it? I understand that Google doesn't have compressed and interned CSS files, so I'd like to load them from AOL. This means that I'd ideally load the JS from Google's CDN to take advantage of the multiple connections thing. (I wouldn't be worried about the blocking nature of script tags for arguments sake - there are several solutions for that). But then, I know that AOL's CDN is older, and that there are likely more apps deployed using their CDN. This takes away some of the benefits of using Google's CDN. Any thoughts on this? My djConfig for xdomain: djConfig = { parseOnLoad: true, baseUrl: "./", modulePaths: { dijit: "js/dojotoolkit/release/dojo/dijit", myapp: 'js/dojotoolkit/release/dojo/pw' }, useXDomain: true, locale: "en" }; My build options: action=clean,release loader=xdomain optimize=shrinksafe cssOptimize=comments profile=myprofile locale="en" My build profile: dependencies = { layers: [ { name: "../../myapp/myscript.js", dependencies: [ "myapp.myscript" ] } ], prefixes: [ [ "dijit", "../dijit" ], [ "dojox", "../dojox" ], ["myapp", "../../myapp"] ] } Any help will be highly appreciated. Thanks in advance. Regards, Rakesh Pai -- Rakesh Pai Mumbai, India. rakesh.pai@... http://piecesofrakesh.blogspot.com/ _______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo-interest@... http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest |
| Free embeddable forum powered by Nabble | Forum Help |