[wip] New seed PoC #586

Closed
wants to merge 8 commits into
from

Conversation

Projects
None yet
4 participants
Owner

davglass commented Apr 5, 2013

Warning, This build will likely fail, horribly

This is my new Proof of Concept YUI seed.

Goals:

  • Make the global not a constructor
  • Make the instances a factory
  • Enable a static global object so we have a static YUI.Env
  • Allow for future proofing of multiple seed files of different versions.
  • General cleanup
  • Better readability

This is a work in progress and not ready to merge yet.

When building, first run shifter in the loader module, then again in the yui module.

The NPM module has not been updated, so if you run tests use yogi test --no-cli to exclude them. All browser based tests work in all modules with yogi test --no-cli from the src dir.

@rgrove rgrove commented on the diff Apr 5, 2013

src/yui/js/yui-instance.js
+ }
+ Factory.Env.core = Y.Array.dedupe([].concat(Factory.Env.core, lCore));
+
+ return loader;
+ },
+ use: function() {
+ var args = Array.prototype.slice.call(arguments, 0),
+ callback = args[args.length - 1],
+ Y = this,
+ i = 0,
+ name,
+ Env = Y.Env,
+ provisioned = true;
+
+ // The last argument supplied to use can be a load complete callback
+ if (Y.Lang.isFunction(callback)) {
@rgrove

rgrove Apr 5, 2013

Contributor

typeof callback === 'function'

@davglass

davglass Apr 5, 2013

Owner

I have done zero perf clean up, but noted!

@rgrove

rgrove Apr 5, 2013

Contributor

Hard to know what's new and what's not in this diff. :/

@davglass

davglass Apr 5, 2013

Owner

I know, but I needed to get it up somewhere so that it's shared. There were boatloads of just moving things around into a better file structure.

@rgrove rgrove commented on the diff Apr 5, 2013

src/yui/js/yui-instance.js
+ is not attached.
+ @private
+ **/
+ _attach: function(r, moot) {
+ var i, name, mod, details, req, use, after,
+ mods = Factory.Env.mods,
+ aliases = Factory.Env.aliases,
+ Y = this, j,
+ cache = Factory.Env._renderedMods,
+ loader = Y.Env._loader,
+ done = Y.Env._attached,
+ len = r.length, loader, def, go,
+ c = [];
+
+ //Check for conditional modules (in a second+ instance) and add their requirements
+ //TODO I hate this entire method, it needs to be fixed ASAP (3.5.0) ^davglass
@rgrove

rgrove Apr 5, 2013

Contributor

ASAP? :)

Member

okuryu commented Apr 6, 2013

src/yui/build.json.OLD: mistake of commit?

Owner

davglass commented Apr 6, 2013

On purpose, the current build.json is stripped for testing &
eventually needs to look closer to the old one.

Contributor

clarle commented May 18, 2014

Closing due to this falling too far behind the current Loader tree.

There's been a lot of Loader improvements since then, but feel free to re-open this if there's any new progress on it!

clarle closed this May 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment