src/console/simpleyui.js
function(name, fn, version, details) {
        details = details || {};
        var env = YUI.Env,
            mod  = {
                name: name, 
                fn: fn,
                version: version,
                details: details
            },
            loader,
            i;

        env.mods[name] = mod;
        env.versions[version] = env.versions[version] || {};
        env.versions[version][name] = mod;

        for (i in instances) {
            if (instances.hasOwnProperty(i)) {
                loader = instances[i].Env._loader;
                if (loader) {
                    if (!loader.moduleInfo[name]) {
                        loader.addModule(details, name);
                    }
                }
            }
        }

        return this;
    }
function(name, fn, version, details) {
        details = details || {};
        var env = YUI.Env,
            mod  = {
                name: name, 
                fn: fn,
                version: version,
                details: details
            },
            loader,
            i;

        env.mods[name] = mod;
        env.versions[version] = env.versions[version] || {};
        env.versions[version][name] = mod;

        for (i in instances) {
            if (instances.hasOwnProperty(i)) {
                loader = instances[i].Env._loader;
                if (loader) {
                    if (!loader.moduleInfo[name]) {
                        loader.addModule(details, name);
                    }
                }
            }
        }

        return this;
    }
function ( name , fn , version , details ) { details = details || { } ; var env = YUI . Env , mod = { name : name , fn : fn , version : version , details : details } , loader , i ; env . mods [ name ] = mod ; env . versions [ version ] = env . versions [ version ] || { } ; env . versions [ version ] [ name ] = mod ; for ( i in instances ) { if ( instances . hasOwnProperty ( i ) ) { loader = instances [ i ] . Env . _loader ; if ( loader ) { if ( ! loader . moduleInfo [ name ] ) { loader . addModule ( details , name ) ; } } } } return this ; }
Registers a module with the YUI global.  The easiest way to create a
first-class YUI module is to use the YUI component build tool.

http://yuilibrary.com/projects/builder

The build system will produce the YUI.add wrapper for you module, along
with any configuration info required for the module.
@method add
@param name {string} module name
@param fn {Function} entry point into the module that
is used to bind module to the YUI instance
@param version {string} version string
@param details optional config data:
requires: features that must be present before this module can be attached.
optional: optional features that should be present if loadOptional is
defined.  Note: modules are not often loaded this way in YUI 3,
but this field is still useful to inform the user that certain
features in the component will require additional dependencies.
use:      features that are included within this module which need to be
be attached automatically when this module is attached.  This
supports the YUI 3 rollup system -- a module with submodules
defined will need to have the submodules listed in the 'use'
config.  The YUI component build tool does this for you.
@return {YUI} the YUI instance
Registers a module with the YUI global . The easiest way to create a first - class YUI module is to use the YUI component build tool .