xuijs / xui

A tiny javascript framework for mobile web apps.
http://xuijs.com
789 stars 106 forks source link

build error #80

Closed Vittly closed 11 years ago

Vittly commented 11 years ago

Hello! I wanted to download the package.

p.s. please add for windows users to build use "ruby build" (because of no extension). p.p.s. why possible builds are BlackBerry, IE and Core? What should I do if I want crossplatform build? Or IE only needed for old IEs?

Shoplifter commented 11 years ago

I had the same problem - figured out, only the link doesnt work. For the moment you can just repace '/downloads/xui-VERSION.js' with '/downloads/xui-2.3.2.js' manually to get the download.

ad p.p.s.: You might use a js loader for loading the proper build of xui (e.g. require.js, head.js, ..) which gives the opportunity to load xui according to navigator.userAgent. Proper build for IE9? I'd like to know either.

Vittly commented 11 years ago

Ok (I can use the loader) but do the xui-project proper such script by default? I could not find it

Shoplifter commented 11 years ago

@Vittly

not that im aware of i'm using kinda snippet like this:

var ua = navigator.userAgent.toLowerCase(); var scr = '/path/to/js/directory/'; if(ua.indexOf("blackberry") >= 0) scr += 'xui-bb-2.3.2.min.js'; else if(ua.indexOf("msie") >= 0) scr += 'xui-ie-2.3.2.min.js'; else scr += 'xui-2.3.2.min.js';

then use a loader to load the js, or 'document.write' at bottom of your page (not recommended) or load it with a simple vanilla js like ..

var t = 'script', d = document, g = d.createElement(t), s = d.getElementsByTagName(t)[0]; g.src=src; s.parentNode.insertBefore(g,s);

personally i'm using head.load.js (see: http://headjs.com/ ) it provides asynch loading, control over loading order and execution