load modules with Ox.VERSION in build mode to make caching work

This commit is contained in:
j 2014-01-11 04:56:12 +00:00
commit 0588ebe211
3 changed files with 5 additions and 4 deletions

View file

@ -78,7 +78,7 @@ Ox.load = function() {
} else {
Ox.forEach(modules, function(options, module) {
Ox.getFile(
Ox.PATH + 'Ox.' + module + '/Ox.' + module + '.js',
Ox.PATH + 'Ox.' + module + '/Ox.' + module + '.js?' + Ox.VERSION,
function() {
Ox.load[module](options, function(success) {
succeeded += success;

View file

@ -96,7 +96,8 @@ Ox.getAsync = function(urls, get, callback) {
var element, tagValue, typeValue, urlKey;
if (!cache[url]) {
if (!type) {
type = url.split('.').pop();
type = Ox.parseURL(url).pathname.split('.').pop();
console.log(type, url);
type = type == 'css' ? 'stylesheet'
: type == 'js' ? 'script' : 'image';
}