Today the YUI Team announced
the little project I have been working on for the last couple of months. The YUI 3 Gallery
So I figured I would write a little post to show a few of the "hidden"
features of the Gallery and how you can use them.
Every module that we push to the CDN has to go through our build system that uses the YUI Builder Tool
. The Builder concatenates files, then compresses them with YUICompressor
and runs JSLint
on them a couple of times. We include this output on every build, so you as the end-user can see that output and use it to determine if you want to use the module in your application. If you look at my YQL Module
and click the link for the Build Tag (Which is the stamp we give each CDN push)
, you will see the code that is required to load this module on your page. Just below that you can see a link called "[Show Build Output]". Clicking that link will show you the raw output generated by the build system.
Some people have asked why they have to include the config in their
instance, to make a Gallery item work.
The short answer is: We didn't want to release a YUI 3.0.1 just to add a couple of lines to one file.
The longer answer is: When we release YUI 3.1.0, this will be built into the
module. And it will be done for you automatically. Since the files are hosted on the CDN, but are not in the same directory as the YUI files are, we had to modify
to know about Gallery modules and make it smart enough to change directories to use the CDN.
However, I have built an API into the Gallery to help with this.
shows how you can load a single js file from YUILibrary.com and plug it into your
instance and have access to all the gallery modules that are currently on the CDN.
The Gallery was designed with a pretty robust API exposed to help developers and users get the most out of the data inside the Gallery.
Here is the list of valid API endpoints:
Last, but not least, my
command line tool has support for the Gallery now.
You can query all the items in the Pending CDN Queue and check them out into a branch to test them before they are on the CDN.
That's about it for now, hope you all enjoy the new Gallery & I hope to see lots of new modules in there soon.