Skip to content

Commit

Permalink
YUI Seed build with flattened dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
davglass committed Jun 16, 2011
1 parent 5d80205 commit 7380653
Show file tree
Hide file tree
Showing 33 changed files with 22,059 additions and 130 deletions.
162 changes: 162 additions & 0 deletions build/features/features-debug.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
YUI.add('features', function(Y) {

var feature_tests = {};

Y.mix(Y.namespace('Features'), {

tests: feature_tests,

add: function(cat, name, o) {
feature_tests[cat] = feature_tests[cat] || {};
feature_tests[cat][name] = o;
},

all: function(cat, args) {
var cat_o = feature_tests[cat],
// results = {};
result = [];
if (cat_o) {
Y.Object.each(cat_o, function(v, k) {
result.push(k + ':' + (Y.Features.test(cat, k, args) ? 1 : 0));
});
}

return (result.length) ? result.join(';') : '';
},

test: function(cat, name, args) {
args = args || [];
var result, ua, test,
cat_o = feature_tests[cat],
feature = cat_o && cat_o[name];

if (!feature) {
Y.log('Feature test ' + cat + ', ' + name + ' not found');
} else {

result = feature.result;

if (Y.Lang.isUndefined(result)) {

ua = feature.ua;
if (ua) {
result = (Y.UA[ua]);
}

test = feature.test;
if (test && ((!ua) || result)) {
result = test.apply(Y, args);
}

feature.result = result;
}
}

return result;
}
});

// Y.Features.add("load", "1", {});
// Y.Features.test("load", "1");
// caps=1:1;2:0;3:1;

/* This file is auto-generated by src/loader/meta_join.py */
var add = Y.Features.add;
// ie-base-test.js
add('load', '0', {
"name": "event-base-ie",
"test": function(Y) {
var imp = Y.config.doc && Y.config.doc.implementation;
return (imp && (!imp.hasFeature('Events', '2.0')));
},
"trigger": "node-base"
});
// ie-style-test.js
add('load', '1', {
"name": "dom-style-ie",
"test": function (Y) {

var testFeature = Y.Features.test,
addFeature = Y.Features.add,
WINDOW = Y.config.win,
DOCUMENT = Y.config.doc,
DOCUMENT_ELEMENT = 'documentElement',
ret = false;

addFeature('style', 'computedStyle', {
test: function() {
return WINDOW && 'getComputedStyle' in WINDOW;
}
});

addFeature('style', 'opacity', {
test: function() {
return DOCUMENT && 'opacity' in DOCUMENT[DOCUMENT_ELEMENT].style;
}
});

ret = (!testFeature('style', 'opacity') &&
!testFeature('style', 'computedStyle'));

return ret;
},
"trigger": "dom-style"
});
// 0
add('load', '2', {
"name": "widget-base-ie",
"trigger": "widget-base",
"ua": "ie"
});
// autocomplete-list-keys-sniff.js
add('load', '3', {
"name": "autocomplete-list-keys",
"test": function (Y) {
// Only add keyboard support to autocomplete-list if this doesn't appear to
// be an iOS or Android-based mobile device.
//
// There's currently no feasible way to actually detect whether a device has
// a hardware keyboard, so this sniff will have to do. It can easily be
// overridden by manually loading the autocomplete-list-keys module.
//
// Worth noting: even though iOS supports bluetooth keyboards, Mobile Safari
// doesn't fire the keyboard events used by AutoCompleteList, so there's
// no point loading the -keys module even when a bluetooth keyboard may be
// available.
return !(Y.UA.ios || Y.UA.android);
},
"trigger": "autocomplete-list"
});
// dd-gestures-test.js
add('load', '4', {
"name": "dd-gestures",
"test": function(Y) {
return (Y.config.win && ('ontouchstart' in Y.config.win && !Y.UA.chrome));
},
"trigger": "dd-drag"
});
// selector-test.js
add('load', '5', {
"name": "selector-css2",
"test": function (Y) {
var DOCUMENT = Y.config.doc,
ret = DOCUMENT && !('querySelectorAll' in DOCUMENT);

return ret;
},
"trigger": "selector"
});
// history-hash-ie-test.js
add('load', '6', {
"name": "history-hash-ie",
"test": function (Y) {
var docMode = Y.config.doc && Y.config.doc.documentMode;

return Y.UA.ie && (!('onhashchange' in Y.config.win) ||
!docMode || docMode < 8);
},
"trigger": "history-hash"
});


}, '@VERSION@' ,{requires:['yui-base']});
1 change: 1 addition & 0 deletions build/features/features-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

161 changes: 161 additions & 0 deletions build/features/features.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
YUI.add('features', function(Y) {

var feature_tests = {};

Y.mix(Y.namespace('Features'), {

tests: feature_tests,

add: function(cat, name, o) {
feature_tests[cat] = feature_tests[cat] || {};
feature_tests[cat][name] = o;
},

all: function(cat, args) {
var cat_o = feature_tests[cat],
// results = {};
result = [];
if (cat_o) {
Y.Object.each(cat_o, function(v, k) {
result.push(k + ':' + (Y.Features.test(cat, k, args) ? 1 : 0));
});
}

return (result.length) ? result.join(';') : '';
},

test: function(cat, name, args) {
args = args || [];
var result, ua, test,
cat_o = feature_tests[cat],
feature = cat_o && cat_o[name];

if (!feature) {
} else {

result = feature.result;

if (Y.Lang.isUndefined(result)) {

ua = feature.ua;
if (ua) {
result = (Y.UA[ua]);
}

test = feature.test;
if (test && ((!ua) || result)) {
result = test.apply(Y, args);
}

feature.result = result;
}
}

return result;
}
});

// Y.Features.add("load", "1", {});
// Y.Features.test("load", "1");
// caps=1:1;2:0;3:1;

/* This file is auto-generated by src/loader/meta_join.py */
var add = Y.Features.add;
// ie-base-test.js
add('load', '0', {
"name": "event-base-ie",
"test": function(Y) {
var imp = Y.config.doc && Y.config.doc.implementation;
return (imp && (!imp.hasFeature('Events', '2.0')));
},
"trigger": "node-base"
});
// ie-style-test.js
add('load', '1', {
"name": "dom-style-ie",
"test": function (Y) {

var testFeature = Y.Features.test,
addFeature = Y.Features.add,
WINDOW = Y.config.win,
DOCUMENT = Y.config.doc,
DOCUMENT_ELEMENT = 'documentElement',
ret = false;

addFeature('style', 'computedStyle', {
test: function() {
return WINDOW && 'getComputedStyle' in WINDOW;
}
});

addFeature('style', 'opacity', {
test: function() {
return DOCUMENT && 'opacity' in DOCUMENT[DOCUMENT_ELEMENT].style;
}
});

ret = (!testFeature('style', 'opacity') &&
!testFeature('style', 'computedStyle'));

return ret;
},
"trigger": "dom-style"
});
// 0
add('load', '2', {
"name": "widget-base-ie",
"trigger": "widget-base",
"ua": "ie"
});
// autocomplete-list-keys-sniff.js
add('load', '3', {
"name": "autocomplete-list-keys",
"test": function (Y) {
// Only add keyboard support to autocomplete-list if this doesn't appear to
// be an iOS or Android-based mobile device.
//
// There's currently no feasible way to actually detect whether a device has
// a hardware keyboard, so this sniff will have to do. It can easily be
// overridden by manually loading the autocomplete-list-keys module.
//
// Worth noting: even though iOS supports bluetooth keyboards, Mobile Safari
// doesn't fire the keyboard events used by AutoCompleteList, so there's
// no point loading the -keys module even when a bluetooth keyboard may be
// available.
return !(Y.UA.ios || Y.UA.android);
},
"trigger": "autocomplete-list"
});
// dd-gestures-test.js
add('load', '4', {
"name": "dd-gestures",
"test": function(Y) {
return (Y.config.win && ('ontouchstart' in Y.config.win && !Y.UA.chrome));
},
"trigger": "dd-drag"
});
// selector-test.js
add('load', '5', {
"name": "selector-css2",
"test": function (Y) {
var DOCUMENT = Y.config.doc,
ret = DOCUMENT && !('querySelectorAll' in DOCUMENT);

return ret;
},
"trigger": "selector"
});
// history-hash-ie-test.js
add('load', '6', {
"name": "history-hash-ie",
"test": function (Y) {
var docMode = Y.config.doc && Y.config.doc.documentMode;

return Y.UA.ie && (!('onhashchange' in Y.config.win) ||
!docMode || docMode < 8);
},
"trigger": "history-hash"
});


}, '@VERSION@' ,{requires:['yui-base']});
Loading

0 comments on commit 7380653

Please sign in to comment.