meta.js revision 60f1a165ceb2a6e449c31938fc390b2e11fa13f6
246N/A/**
246N/A * The YUI loader core
246N/A * @module loader
246N/A * @submodule loader-base
246N/A */
246N/A
246N/Aif (!YUI.Env[Y.version]) {
246N/A
246N/A (function() {
246N/A var VERSION = Y.version,
246N/A BUILD = '/build/',
246N/A ROOT = VERSION + BUILD,
246N/A CDN_BASE = Y.Env.base,
246N/A GALLERY_VERSION = '@GALLERY@',
246N/A TNT = '2in3',
246N/A TNT_VERSION = '@TNT@',
246N/A YUI2_VERSION = '@YUI2@',
246N/A COMBO_BASE = CDN_BASE + 'combo?',
246N/A META = { version: VERSION,
246N/A root: ROOT,
246N/A base: Y.Env.base,
246N/A comboBase: COMBO_BASE,
246N/A skin: { defaultSkin: 'sam',
246N/A base: 'assets/skins/',
246N/A path: 'skin.css',
246N/A after: ['cssreset',
246N/A 'cssfonts',
246N/A 'cssgrids',
246N/A 'cssbase',
246N/A 'cssreset-context',
246N/A 'cssfonts-context']},
246N/A groups: {},
246N/A patterns: {} },
246N/A groups = META.groups,
246N/A yui2Update = function(tnt, yui2) {
246N/A var root = TNT + '.' +
246N/A (tnt || TNT_VERSION) + '/' +
246N/A (yui2 || YUI2_VERSION) + BUILD;
246N/A groups.yui2.base = CDN_BASE + root;
246N/A groups.yui2.root = root;
},
galleryUpdate = function(tag) {
var root = (tag || GALLERY_VERSION) + BUILD;
groups.gallery.base = CDN_BASE + root;
groups.gallery.root = root;
};
groups[VERSION] = {};
groups.gallery = {
ext: false,
combine: true,
comboBase: COMBO_BASE,
update: galleryUpdate,
patterns: { 'gallery-': { },
'gallerycss-': { type: 'css' } }
};
groups.yui2 = {
combine: true,
ext: false,
comboBase: COMBO_BASE,
update: yui2Update,
patterns: {
'yui2-': {
configFn: function(me) {
if (/-skin|reset|fonts|grids|base/.test(me.name)) {
me.type = 'css';
me.path = me.path.replace(/\.js/, '.css');
// this makes skins in builds earlier than
// 2.6.0 work as long as combine is false
me.path = me.path.replace(/\/yui2-skin/,
'/assets/skins/sam/yui2-skin');
}
}
}
}
};
galleryUpdate();
yui2Update();
YUI.Env[VERSION] = META;
}());
}