What if you just removed the port declarations from your package? That's only a few lines of code, and nothing else seems to depend on them (except a little Util function). The rest of your work could even be published to the package manager.
On Fri, Nov 18, 2016 at 4:18 AM, 'Rupert Smith' via Elm Discuss < [email protected]> wrote: > On Friday, November 18, 2016 at 11:17:23 AM UTC, Peter Damoc wrote: >> >> There are two approaches to interacting with JS: >> 1. ports >> 2. Native >> >> modules with ports cannot be packaged/published and are designed to be >> used ONLY in the final product >> modules with Native code can be packaged/published but they have to be >> whitelisted. >> Their use is discouraged outside of the web-platform that the official >> elm-lang org is implementing. >> >> elm-github-install is designed for the brave rebels who want to >> collaborate on non-whitelisted Native modules. >> >> To my knowledge, port modules were never designed to be shared. >> > > I understand and support the reasons for the above. Ok, so when it says it > can be used to share native modules it does not mean ports. > > I found using a port to enable global communication with the Auth module > from anywhere in my application (any time you get a 401 or 403 you invoke > 'unauthed') to be quite convenient. Perhaps I might find a better solution > to this using out messages, or perhaps Elm will eventually develop some > sort of pub/sub messaging mechanism that I could use instead. > > I'm only wanting to share this code accross my own projects - i don't > think it is really usable by others in its current state. > > I think I will put all the code I want to share in its own folder, and > share that accross projects as a git submodule. Not the ideal solution but > better than the alternative of cut and paste coding. > > -- > You received this message because you are subscribed to the Google Groups > "Elm Discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
