Answer the question
In order to leave comments, you need to log in
Can Composer be configured to put all package files in a shared folder?
Good day to all! The question is in the title of the topic, I'll decipher it a bit:
You need to make a template collector from different pieces. Let's say I have ready-made stretched sections for a Wordpress site: header, slider, text block, contacts. Each of these sections is in my repository. Task: take files from each of these sections, place them in a folder with an initialized Composer, preserving the paths:
#header
/scss/_header.scss
/include/header-fields.php
/include/header-contact-form.php
/js/header.js
header.php
#slider
/css/slick.css
/css/slick-theme.css
/scss/_slider.scss
/js/slider.js
/include/slider-fields.php
/parts/slider.php
/scss/_header.scss
/_slider.scss
/css/slick.css
/slick-theme.css
/include/header-fields.php
/header-contact-form.php
/slider-fields.php
/js/header.js
/slider.js
/parts/slider.php
header.php
Answer the question
In order to leave comments, you need to log in
To write such things, there is such a thing as "plugins". Composer has an API when installing a dependency that you can use and create whatever you want.
The second link that Dmitry pointed out in the comments is an example of such "creativity". These commands are used there: https://github.com/zendframework/zend-expressive-s... documentation for which is on the composer's website: https://getcomposer.org/doc/articles/scripts.md#co. .. where these methods are called during installation: https
: //github.com/zendframework/zend-expressive-s...
There is no documentation on it, but by typing you can try to figure it out on your own.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question