Announcement

Collapse
No announcement yet.

Managing EspoCRM modules/extensions with Modman

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Managing EspoCRM modules/extensions with Modman

    Hi. This is another experimental approach from me. Let me know if it makes sense for you guys:

    Since my first days with EspoCRM I was wondering if there's a better way to manage extensions. Below I will outline the approach widely used in Magento 1.x called "modman".

    Modman (https://github.com/colinmollenhour/modman) is abbreviation from Module Manager. It's a CLI script which allows to keep your extensions outside of the main application source and deploy them with simple commands.

    First you have to run "modman init" command from your project root dir. This will simply create a ".modman" directory.

    Now let's say I want to install "espocrm/ext-export-import" module. You can download an archive and extract it inside of ".modman" dir. You will end up with something like this:

    Click image for larger version

Name:	Screenshot 2.png
Views:	128
Size:	101.7 KB
ID:	110537

    Now you have to add "modman" text file inside of ".modman/ext-export-import/" with following content:

    Code:
    src/files/custom/Espo/Modules/ExportImport custom/Espo/Modules/ExportImport
    and run "modman deploy ext-export-import"

    Modman will create a symlink from .modman/ext-export-import/src/files/custom/Espo/Modules/ExportImport to custom/Espo/Modules/ExportImport

    That's it.

    I keep all my modules separated like this. Regardless if this is a 3rd-party vendor extension or my own development.

    There are quite some benefits of this approach:
    • Better overview of modules installed in the system
    • Better overview of module files themselves
    • Easier upgrades - Just drop new files and re-deploy
    • Easier removal of modules
    • Possibility to use git submodules
    It also work fine together with my approach of Installing EspoCRM as a Composer Dependency.

    Please let me know what do you think?

    Best regards,
    Tim

  • #2
    I don't know but sound good! This is all mumbo jumbo for non coder like me. But anything for the benefit of EspoCRM.

    Whether yuri agree to it is another matter and insight. Perhaps it up for discussion or there is always a "Pull Request" plan

    Comment


    • #3
      Honestly I think that the current way of installing extensions using the UI is perfect.

      Comment


      • Kharg
        Kharg commented
        Editing a comment
        Yes, I use VCS for development, then I use a powershell script to package my extension.

      • tim
        tim commented
        Editing a comment
        But when you install the extension to you EspoCRM via UI do you check it into VCS?

      • yuri
        yuri commented
        Editing a comment
        There are multiple approaches. One may commit all in git, and use git to deploy. One would use a separate repository to develop their custom extension and the official Espo release build. And deploy without using VCS.

    • #4
      Hi,

      Just wanted to remind whomever who read. If you add commercial extensions into a GIT repository and then publish it (e.g. in the public GitHub repository), that would be a license violation. We faced with this multiple times before and that gave us a hard time.

      Comment

      Working...
      X