Jump to content

How To Share External Libraries Across Modules?


Recommended Posts

What would be the best way to share external libraries or my classes across modules? Should I install them to the 'tools' folder? I don't really like this idea, because I can't track the dependencies this way. I'm also afraid of versions collision while using some public library. (eventually I can use namespaces, but i want to avoid that)

 

Thanks!

Link to comment
Share on other sites

Create a simple module that contains these external libraries in a lib sub-folder.  Then in all your other modules that need to use this external libraries, you want make a dependency that this simple module is installed.  If it is missing, then show the merchant a warning on the modules page.

 

Once you have this common simple module installed, than all your other dependent modules will know exactly where to include/require from

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...