juliancwirko / meteor-s-alert

Simple and fancy notifications for Meteor
https://atmospherejs.com/juliancwirko/s-alert
190 stars 23 forks source link

import routers using ES2015 modules #54

Open NateBrady23 opened 8 years ago

NateBrady23 commented 8 years ago

In a current project I'm blowing up globals in a lib file to test imports which I noted here. This has been working great so far and is a good way to prepare for the upcoming move to strictly using imports. Unfortunately, sAlert breaks when I blow up the FlowRouter global because it is not being imported in s-alert.js. This would be super helpful and prepare for the move to ES2015 module imports!

Edit: I guess this would be more of an overall update for compatibility with Meteor 1.3

juliancwirko commented 8 years ago

Yes, I plan to rebuild the package. But not now. Also I don't know exactly how to replace this part: https://github.com/juliancwirko/meteor-s-alert/blob/master/client/s-alert.js#L132 This is based on globals, and I don't want to import routers here. I just want to check if someone use them. Maybe I will remove this functionality and provide some docs how to clear alerts on route change.

For now in Meteor 1.3 the package should work. Of course if you don't block (intencionally) 'Meteor' and other globals ;)

juliancwirko commented 8 years ago

Oh, and if you use React you can try pure React component: https://www.npmjs.com/package/react-s-alert

NateBrady23 commented 8 years ago

Oh very cool. I am thinking about moving to React soon. Thanks for the updates!