Permalink
Browse files

Seed and Loader build ref #2532070

  • Loading branch information...
1 parent 43fcc90 commit e1c00875294376e120f31bb9cc919d285c6ef449 @davglass committed Apr 19, 2012
@@ -121,6 +121,7 @@ var NOT_FOUND = {},
CSS = 'css',
JS = 'js',
INTL = 'intl',
+ DEFAULT_SKIN = 'sam',
VERSION = Y.version,
ROOT_LANG = '',
YObject = Y.Object,
@@ -134,14 +135,14 @@ var NOT_FOUND = {},
modulekey,
cache,
_path = function(dir, file, type, nomin) {
- var path = dir + '/' + file;
- if (!nomin) {
- path += '-min';
- }
- path += '.' + (type || CSS);
+ var path = dir + '/' + file;
+ if (!nomin) {
+ path += '-min';
+ }
+ path += '.' + (type || CSS);
- return path;
- };
+ return path;
+ };
/**
* The component metadata is stored in Y.Env.meta.
@@ -655,6 +656,9 @@ Y.Loader.prototype = {
}
});
}
+ if (mod.skinnable) {
+ self._addSkin(self.skin.defaultSkin, mod.name);
+ }
});
},
/**
@@ -902,6 +906,7 @@ Y.Loader.prototype = {
mdef = info[mod];
pkg = mdef.pkg || mod;
nmod = {
+ skin: true,
name: name,
group: mdef.group,
type: 'css',
@@ -1392,7 +1397,7 @@ Y.Loader.prototype = {
intl = mod.lang || mod.intl,
info = this.moduleInfo,
ftests = Y.Features && Y.Features.tests.load,
- hash;
+ hash, reparse;
// console.log(name);
@@ -1406,8 +1411,11 @@ Y.Loader.prototype = {
}
// console.log('cache: ' + mod.langCache + ' == ' + this.lang);
+
+ //If a skin or a lang is different, reparse..
+ reparse = !((!this.lang || mod.langCache === this.lang) && (mod.skinCache === this.skin.defaultSkin));
- if (mod.expanded && (!this.lang || mod.langCache === this.lang)) {
+ if (mod.expanded && !reparse) {
//Y.log('Already expanded ' + name + ', ' + mod.expanded);
return mod.expanded;
}
@@ -1429,6 +1437,7 @@ Y.Loader.prototype = {
mod._parsed = true;
mod.langCache = this.lang;
+ mod.skinCache = this.skin.defaultSkin;
for (i = 0; i < r.length; i++) {
//Y.log(name + ' requiring ' + r[i], 'info', 'loader');
@@ -2161,10 +2170,10 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
// don't include type so we can process CSS and script in
// one pass when the type is not specified.
if (!skipcalc) {
- this.calculate(o);
+ //this.calculate(o);
}
- var modules = this.resolve(),
+ var modules = this.resolve(!skipcalc),
self = this, comp = 0, actions = 0;
if (type) {
@@ -2403,7 +2412,7 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
resolved = { js: [], jsMods: [], css: [], cssMods: [] },
type = self.loadType || 'js';
- if (self.skin.overrides) {
+ if (self.skin.overrides || self.skin.defaultSkin !== DEFAULT_SKIN || self.ignoreRegistered) {
self.resetModules();
}

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -121,6 +121,7 @@ var NOT_FOUND = {},
CSS = 'css',
JS = 'js',
INTL = 'intl',
+ DEFAULT_SKIN = 'sam',
VERSION = Y.version,
ROOT_LANG = '',
YObject = Y.Object,
@@ -134,14 +135,14 @@ var NOT_FOUND = {},
modulekey,
cache,
_path = function(dir, file, type, nomin) {
- var path = dir + '/' + file;
- if (!nomin) {
- path += '-min';
- }
- path += '.' + (type || CSS);
+ var path = dir + '/' + file;
+ if (!nomin) {
+ path += '-min';
+ }
+ path += '.' + (type || CSS);
- return path;
- };
+ return path;
+ };
/**
* The component metadata is stored in Y.Env.meta.
@@ -655,6 +656,9 @@ Y.Loader.prototype = {
}
});
}
+ if (mod.skinnable) {
+ self._addSkin(self.skin.defaultSkin, mod.name);
+ }
});
},
/**
@@ -900,6 +904,7 @@ Y.Loader.prototype = {
mdef = info[mod];
pkg = mdef.pkg || mod;
nmod = {
+ skin: true,
name: name,
group: mdef.group,
type: 'css',
@@ -1385,7 +1390,7 @@ Y.Loader.prototype = {
intl = mod.lang || mod.intl,
info = this.moduleInfo,
ftests = Y.Features && Y.Features.tests.load,
- hash;
+ hash, reparse;
// console.log(name);
@@ -1399,8 +1404,11 @@ Y.Loader.prototype = {
}
// console.log('cache: ' + mod.langCache + ' == ' + this.lang);
+
+ //If a skin or a lang is different, reparse..
+ reparse = !((!this.lang || mod.langCache === this.lang) && (mod.skinCache === this.skin.defaultSkin));
- if (mod.expanded && (!this.lang || mod.langCache === this.lang)) {
+ if (mod.expanded && !reparse) {
return mod.expanded;
}
@@ -1419,6 +1427,7 @@ Y.Loader.prototype = {
mod._parsed = true;
mod.langCache = this.lang;
+ mod.skinCache = this.skin.defaultSkin;
for (i = 0; i < r.length; i++) {
if (!hash[r[i]]) {
@@ -2136,10 +2145,10 @@ Y.Loader.prototype = {
// don't include type so we can process CSS and script in
// one pass when the type is not specified.
if (!skipcalc) {
- this.calculate(o);
+ //this.calculate(o);
}
- var modules = this.resolve(),
+ var modules = this.resolve(!skipcalc),
self = this, comp = 0, actions = 0;
if (type) {
@@ -2370,7 +2379,7 @@ Y.Loader.prototype = {
resolved = { js: [], jsMods: [], css: [], cssMods: [] },
type = self.loadType || 'js';
- if (self.skin.overrides) {
+ if (self.skin.overrides || self.skin.defaultSkin !== DEFAULT_SKIN || self.ignoreRegistered) {
self.resetModules();
}
@@ -121,6 +121,7 @@ var NOT_FOUND = {},
CSS = 'css',
JS = 'js',
INTL = 'intl',
+ DEFAULT_SKIN = 'sam',
VERSION = Y.version,
ROOT_LANG = '',
YObject = Y.Object,
@@ -134,14 +135,14 @@ var NOT_FOUND = {},
modulekey,
cache,
_path = function(dir, file, type, nomin) {
- var path = dir + '/' + file;
- if (!nomin) {
- path += '-min';
- }
- path += '.' + (type || CSS);
+ var path = dir + '/' + file;
+ if (!nomin) {
+ path += '-min';
+ }
+ path += '.' + (type || CSS);
- return path;
- };
+ return path;
+ };
/**
* The component metadata is stored in Y.Env.meta.
@@ -655,6 +656,9 @@ Y.Loader.prototype = {
}
});
}
+ if (mod.skinnable) {
+ self._addSkin(self.skin.defaultSkin, mod.name);
+ }
});
},
/**
@@ -902,6 +906,7 @@ Y.Loader.prototype = {
mdef = info[mod];
pkg = mdef.pkg || mod;
nmod = {
+ skin: true,
name: name,
group: mdef.group,
type: 'css',
@@ -1392,7 +1397,7 @@ Y.Loader.prototype = {
intl = mod.lang || mod.intl,
info = this.moduleInfo,
ftests = Y.Features && Y.Features.tests.load,
- hash;
+ hash, reparse;
// console.log(name);
@@ -1406,8 +1411,11 @@ Y.Loader.prototype = {
}
// console.log('cache: ' + mod.langCache + ' == ' + this.lang);
+
+ //If a skin or a lang is different, reparse..
+ reparse = !((!this.lang || mod.langCache === this.lang) && (mod.skinCache === this.skin.defaultSkin));
- if (mod.expanded && (!this.lang || mod.langCache === this.lang)) {
+ if (mod.expanded && !reparse) {
//Y.log('Already expanded ' + name + ', ' + mod.expanded);
return mod.expanded;
}
@@ -1429,6 +1437,7 @@ Y.Loader.prototype = {
mod._parsed = true;
mod.langCache = this.lang;
+ mod.skinCache = this.skin.defaultSkin;
for (i = 0; i < r.length; i++) {
//Y.log(name + ' requiring ' + r[i], 'info', 'loader');
@@ -2161,10 +2170,10 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
// don't include type so we can process CSS and script in
// one pass when the type is not specified.
if (!skipcalc) {
- this.calculate(o);
+ //this.calculate(o);
}
- var modules = this.resolve(),
+ var modules = this.resolve(!skipcalc),
self = this, comp = 0, actions = 0;
if (type) {
@@ -2403,7 +2412,7 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
resolved = { js: [], jsMods: [], css: [], cssMods: [] },
type = self.loadType || 'js';
- if (self.skin.overrides) {
+ if (self.skin.overrides || self.skin.defaultSkin !== DEFAULT_SKIN || self.ignoreRegistered) {
self.resetModules();
}
Oops, something went wrong.

0 comments on commit e1c0087

Please sign in to comment.