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:
Now you have to add "modman" text file inside of ".modman/ext-export-import/" with following content:
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:
Please let me know what do you think?
Best regards,
Tim
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:
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
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
Please let me know what do you think?
Best regards,
Tim
Comment