The Gallery is deprecated. No new Gallery components may be submitted, and modifying existing components is disabled. For more information please read the Gallery Deprecation blog post. This is a static snapshot of the Gallery for archive purposes.
YUI({
//Last Gallery Build of this module
gallery: 'gallery-2012.11.09-01-41'
}).use('gallery-badge', function(Y) {
//Simple Use Case
var node = Y.one('div.badge');
node.plug(Y.Plugin.Badge, {
type: 'oncdn' //popular, new, all, featured
});
node.set('username', 'davglass');
//or
node.set('type', 'popular');
//Event Driven, with No Layout
node = Y.one('div.badge');
node.plug(Y.Plugin.Badge, {
username: 'davglass',
render: false
});
node.badge.on('dataReturned', function(e) {
e.preventDefault();
console.log(e);
});
node.badge.render();
});
---------- start logs from yogi.stdout.log ---------- yogi [info] using yogi@0.0.35 on node@0.8.14 yogi [warn] THIS IS EXPERIMENTAL, USE AT YOUR OWN RISK!! yogi [info] using module: gallery-badge yogi [info] prepping grover tests yogi [info] adding tests route yogi [info] listening on: http://127.0.0.1:5011 yogi [info] turning on coverage support in grover Starting Grover on 1 files with PhantomJS@1.7.0 Running 15 concurrent tests at a time. Using a 120 second timeout per test. ✖ [gallery-badge]: Passed: 0 Failed: 1 Total: 1 (ignored 0) (0.006 seconds) test is empty No Tests Provided For This Module Writing files in JSON format to: /ssd/home/yui/src/gallery-build/cdn_gallery-2012.11.09-01-41/src/gallery-badge/logs/tests.json yogi [bail] grover returned a failure ---------- end logs from yogi.stdout.log ---------- ---------- start logs from shifter.stdout.log ---------- shifter[0m [info][0m revving up shifter[0m [info][0m looking for build.json file shifter[0m [info][0m found build.json file, shifting shifter[0m [info][0m putting the hammer down, let's build this thing! shifter[0m [info][0m munging in loader meta data into build.json shifter[0m [info][0m putting the hammer down shifter[0m [info][0m shifting into gear for gallery-badge shifter[0m [info][0m deleting build dir: /ssd/home/yui/src/gallery-build/cdn_gallery-2012.11.09-01-41/build/gallery-badge shifter[0m [queu][0m writing RAW file shifter[0m [queu][0m compressing gallery-badge/gallery-badge.js with UglifyJS shifter[0m [queu][0m writing -min file shifter[0m [info][0m shifting for coverage shifter[0m [info][0m shifting assets for gallery-badge shifter[0m [queu][0m coverage file read, starting coverage for: gallery-badge/gallery-badge.js shifter[0m [info][0m istanbul providing coverage shifter[0m [queu][0m instrumenting with istanbul shifter[0m [queu][0m writing coverage file to gallery-badge/gallery-badge-coverage.js shifter[0m [info][0m done racing, the gears are toast shifter[0m [info][0m finished in 0.112 seconds, pretty fast huh? ---------- end logs from shifter.stdout.log ---------- ---------- start logs from shifter.stderr.log ---------- shifter[0m [err][0m /ssd/home/yui/src/gallery-build/cdn_gallery-2012.11.09-01-41/src/gallery-badge/js/badge.js contains 5 lint errors #1: Expected '!==' and instead saw '!='.[0m if (type != 'random') { // line 80, pos 26[0m #2: Expected '===' and instead saw '=='.[0m if (type == 'user') { // line 81, pos 30[0m #3: Line too long.[0m header = Y.Node.create('<h2><a href="http:/'+'/yuilibrary.com/gallery/user/' + data.userinfo.username + '">' + data.userinfo.fullname + ''s Gallery Items</a></h2>'); // line 82, pos 190[0m #4: Expected '===' and instead saw '=='.[0m if (type == 'user') { // line 97, pos 26[0m #5: 'e' is defined but never used.[0m updateUI: function(e) { // line 109, pos 33[0m ---------- end logs from shifter.stderr.log ---------- ---------- start logs from yogi.stderr.log ---------- no data logged ---------- end logs from yogi.stderr.log ----------
All code on this site is licensed under the BSD License unless stated otherwise.