html-next / ember-hammertime

TouchAction (aka "fastclick") Support for Ember Applications
MIT License
56 stars 23 forks source link

Fix for upcoming FastBoot 1.0 breaking changes #34

Closed simonihmig closed 7 years ago

simonihmig commented 7 years ago

process.env.EMBER_CLI_FASTBOOT will be gone in FastBoot 1.0. This should now work in pre and post 1.0 versions of ember-cli-fastboot. See https://github.com/ember-fastboot/ember-cli-fastboot/issues/360 for context.

Also includes some ES6 code style cleanup...

RobbieTheWagner commented 7 years ago

Hi @simonihmig I'm confused, how does fastboot know to ignore importing it now?

simonihmig commented 7 years ago

It does not. That's why there is this guard now to not run browser stuff in FastBoot: https://github.com/html-next/ember-hammertime/pull/34/files#diff-168726dbe96b3ce427e7fedce31bb0bcR32

For FastBoot 1.0 there will be just one build, not two separate like now (browser + FastBoot). So all browser JS will also be part of the FastBoot app, so we have to use guards. Here is some more context: https://gist.github.com/kratiahuja/fd073007e10abb9db0a2ec42bc1d7c17

I guess there will be some official blog post some time soon explaining the future changes, but I wanted to prepare things in advance, at least for those addons I need in my FastBoot app...

RobbieTheWagner commented 7 years ago

@simonihmig I just hit these issues myself, so I am going to merge this. After looking at the changes, it appears this is only compatible with the new fastboot standards right? Isn't there something else we need to do to make sure it works with both the old beta standards and the new rc standards?

simonihmig commented 7 years ago

@rwwagner90 Thanks for merging. I actually see no reason why this should not work with the older beta versions of FastBoot as well!