I have developed a component to crop images, and now I am migrating it to Yii 2. There are a PHP class, a JS, a CSS, and an image files.
I am in doubt whether I place these files. Is it better to create a directory at basepath/vendor, or to add in the respective directories (image, css, and js), on backend/web and reference them in backend/assets/AppAsset? Note that I will only use this component in the backoffice.
What is the conventional way to do this?
For my experience is better build a component in
vendor/yourVendorName/yourModuleName
in the form ofmodule
and the you can use it where do you prefer adding tomodules
section ofconfig/main.php
of your app