Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use latest visit API #2

Merged
merged 1 commit into from
Oct 16, 2015
Merged

Conversation

chancancode
Copy link
Contributor

Update fastboot server for emberjs/ember.js#12394

Require coordination from ember-fastboot/ember-cli-fastboot#71

  • Take advantage of the new API
  • FastFail™
  • Don't mutate autoBoot
  • Remove FastBoot global
  • Better integration with Ember CLI
  • Move most of the work out of initializers
  • Test that it works
  • Write tests

Open question:

  • What are the rules regarding passing complex objects across the sandbox boundary? It would not be hard to avoid that if we have to.

cc @tomdale @stefanpenner

this.waitForBoot = function() {
return appBoot.promise;
};
var AppFactory = sandbox.require('~fast-boot/app-factory');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pardon my ignorance, but what does ~ do here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied it from Stef :P I think it is just to make it less likely to collide with user codez; on the other hand, I already relied on a globa called FastBoot so...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is injected from the addon build step

@chancancode chancancode force-pushed the new-visit-api branch 3 times, most recently from 7a5b606 to 2c71bde Compare October 12, 2015 09:38
This commit has an implicit cross-dependency on ember-fastboot/ember-cli-fastboot#71.

This commit takes advantage of the new visit API in Ember and moves
most of the heavy-lifting (runtime stuff) into the server.
@chancancode chancancode changed the title [WIP] Use latest visit API Use latest visit API Oct 14, 2015
@rwjblue
Copy link
Member

rwjblue commented Oct 15, 2015

LGTM

@tomdale - Can you review?

var sandbox = createSandbox(appBoot.resolve, {
najax: najax
});
var sandbox = createSandbox({ najax: najax });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should think about exposing a more flexible primitive for this so addons can do similar things.

@tomdale
Copy link
Contributor

tomdale commented Oct 16, 2015

Awesome work, @chancancode!

tomdale added a commit that referenced this pull request Oct 16, 2015
@tomdale tomdale merged commit 10f247d into ember-fastboot:master Oct 16, 2015
@tomdale
Copy link
Contributor

tomdale commented Oct 16, 2015

Published this as v0.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants