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

fastboot ready #330

Closed

Conversation

davidpett
Copy link
Contributor

added the guards to allow ember-paper to be fastboot ready

@thejohnnybot
Copy link

+1

@eriktrom
Copy link
Contributor

I made a similar PR this morning - #353 - guess i should have read the current PR's first. 👅

Just a note/thought/opinion - when we do go down this road my preference would be NOT to use something like the typeof FastBoot b/c the in this case the variable FastBoot is defined within the vm context on the node server and unless there is consensus among the core team as to what that variable should be, and where it should be defined, it seems more sane to place the util inside the ember(and thus DOM only) code that way people are not confused by where the random FastBoot variable came from.

As an example, I have this TODO in my fastboot code. So far this is the only library I have installed that uses this variable, and it's the only project by that author that uses it as well:

FastBoot: true, // for /runspired/ember-run-raf/blob/master/addon/utils/is-fastboot.js (TODO: Make PR to change)

Just a thought.

(also overriding the Ember.Component init() function by re-opening it and injecting it in place of a normal Ember.Component only when running in node is probably the most robust way to (currently) handle this. The init method inside components is the only hook called by fastboot code. That said, Mixins are also mixed into components in this codebase so that part would need another round of thought to solve. I'm just throwing out some ideas at this stage. Brain teasers for the future if you will.)

so 2 thoughts, anywho....

@davidpett
Copy link
Contributor Author

@eriktrom correct, at the time of this PR, this was the way to check for FastBoot. Since then, there is a property on the fastboot service isFastBoot which does use the global car check, but at least it is not in this addon

@eriktrom
Copy link
Contributor

thanks @davidpett - i'll have to catch up on the latest from the commit line - thanks for the heads up :)

@eriktrom eriktrom mentioned this pull request May 6, 2016
@dustinfarris
Copy link
Contributor

Can this be closed?

@miguelcobain miguelcobain mentioned this pull request Jul 12, 2016
@dustinfarris
Copy link
Contributor

I think this can be closed thanks to #430

/cc @miguelcobain

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

Successfully merging this pull request may close these issues.

5 participants