New Reloader package to replace reload-on-resume


#1

Hi all,

Just pushed my new Reloader package to Atmosphere. From the Readme:

More control over hot code push reloading for your production apps. Designed to replace mdg:reload-on-resume and provide a more production-ready approach.

After chatting with @loren and @martijnwalraven I think that this should cover most scenarios people will have, but let me know!

https://atmospherejs.com/jamielob/reloader

Jamie


#2

Nice job! :raised_hands: This is has much better UX, functionality, and flexibility than reload-on-resume


#3

What would we need to validate to deprecate reload-on-resume and recommend this instead?


#4

From my end I would want to cover at least one more scenario (being discussed in the issues right now). I also need to add some tests.

Anything else you can think of?


#5

I’m thinking it would be good to see if people have tried using it in a few production apps, and how it went!


#6

The other thing it needs is this one line PR fix that was merged recently: https://github.com/meteor/meteor/commit/0ed640b31be26fb37594c2da7232d54a0b0e0b99


#7

Hi all, @martijnwalraven any updates / direction on this pls?

I am currently using mdg:reload-on-resume , not sure which is the best way to go?

I also see https://atmospherejs.com/meteor/reload-on-resume but it’s only showing up as 86 installs, at the moment.

Also, I am trying to debug Getting error: Two Migrations in Progress and not sure if it’s related to this package… anyway, keen for some direction from MDG pls?


#8

Please don’t deprecate mdg:reload-on-resume… finally have everything working rock-solid with Meteor 1.3 and hot code push. It works great on production – I’d highly recommend this simple core package.

I’m using it to only reload on a specific path as so…

import { Reload } from 'meteor/reload';
import { Tracker } from 'meteor/tracker';
import { FlowRouter } from 'meteor/kadira:flow-router';
import showLoadingThenReload from '../imports/show-loading-then-reload';

// Let's manually check for update when on home screen, and reload if there is one
Tracker.autorun(() => {
  const current = FlowRouter.current();
  const currentRouteName = current.route && current.route.name ? current.route.name : '';

  FlowRouter.watchPathChange();

  // We need this here because an update is available
  // and we don't want to wait for resume to reload on these routes
  if (Reload.isWaitingForResume() && currentRouteName === 'home') showLoadingThenReload();
});