veliovgroup / flow-router

🚦 Carefully extended flow-router for Meteor
https://packosphere.com/ostrio/flow-router-extra
BSD 3-Clause "New" or "Revised" License
202 stars 29 forks source link

arillo:flow-router-helpers #7

Closed valorloff closed 7 years ago

valorloff commented 7 years ago

Hi! After adding arillo:flow-router-helpers, Exception in template helper: ReferenceError: FlowRouter is not defined, in /lib/ directory present: Package['kadira:flow-router'] = Package['ostrio:flow-router-extra']; is it compatible packages?

dr-dimitru commented 7 years ago

Hello @valorloff ,

Since v3.0 FlowRouter is not exported to global namespace. And that means arillo:flow-router-helpers wouldn't work.

Good news - I made this snippet which brings it back. Let me know if it fits your needs.

Probably we should send a PR to zimme:active-route and arillo:flow-router-helpers

Would like to know thoughts of @arillo and @zimme , will you accept a PR?

zimme commented 7 years ago

@dr-dimitru, Just a note on my package. I've created activeroute:core, activeroute:flow-router and activeroute:blaze which works a bit different and that's where I'll be putting my focus and handing it over to the community if there are people willing to help out with maintaining.

dr-dimitru commented 7 years ago

Hello @zimme ,

Got it. Quick guess - there is no possibility even for weak dependency for ostrio:flow-router-extra in zimme:active-route, right?

zimme commented 7 years ago

We could probably update that package to have a weak dependency but if it doesn't export FlowRouter I don't believe it will work. Open an issue and write down some specifics on what's needed from my package to make this work and I'll see if I have time to do it my self otherwise I'm happy to accept a PR if that will help people out.

valorloff commented 7 years ago

I did it this way: meteor remove arillo:flow-router-helpers and import '/imports/modules/active-route.js'; and pathFor works! and please explain, what is export { ActiveRoute, FlowRouterHelpers } for? for server purposes only?

dr-dimitru commented 7 years ago

{ ActiveRoute, FlowRouterHelpers } this variables is exported for case if for any reason you want to use its methods directly in JS code.

valorloff commented 7 years ago

Thanks for super fast response and support!

dr-dimitru commented 7 years ago

@valorloff you're welcome :)

Thank you for reasonable question, will add this snippet to the docs.

valorloff commented 7 years ago

I suggest include FR-helpers in FR-extra package out of the box

dr-dimitru commented 7 years ago

@valorloff

I suggest include FR-helpers in FR-extra package out of the box

Sounds reasonable, will schedule this for next release.

dr-dimitru commented 7 years ago

Hello @valorloff ,

Implemented in v3.1.0

Let me know how it works on your end. Thank you for feature suggestion

valorloff commented 7 years ago

Great news! Here it is promptness!

dr-dimitru commented 7 years ago

@valorloff ,

Thank you once again. Have you tested it on your end?

valorloff commented 7 years ago

That's just update FR-extra to 3.1.0 and remove import of active-route.js, pathFor and urlFor works! nice! @dr-dimitru, big thanks for your support! Can anybody else check FlowRouter-extra helpers in their project ?

dr-dimitru commented 7 years ago

@valorloff we are actively using FR-Extra in our projects. It works on our end.

I'm assuming we can close this one now

valorloff commented 7 years ago

Beyond any doubt!

dr-dimitru commented 7 years ago

Please, support this project by: