Replies: 1 comment
-
Hi Martín—Thanks for posting this! I definitely recognize that it's not immediately obvious how to approach Composer dependencies meant to be part of the theme itself (as opposed to the included dev dependencies). Because Composer doesn't support multiple locations for the I've seen mixed advice on simply adding a second I'd be curious to hear your thoughts! I could see this evolving into a documentation page at some point. |
Beta Was this translation helpful? Give feedback.
-
I'd like to start by saying that I am really enjoying the _tw DX.
Nevertheless, I've got a couple of questions, but it boils down to this: how do you deal with Composer dependencies?
Once you zip/bundle, the vendor folder is not included. I like to use some libraries like Log1x/navi or htmlburgers/carbon-fields, but I am not really sure how to tackle this issue, since once you zip/bundled there is no autoload, so no libraries.
I wouldn't mind having to install the libraries once the theme is deployed, but even then, there is no composer.json neither.
I could modify the zip.js to also copy the vendor, composer.json, and composer-lock.json. Or maybe just the last two.
So the question remains: how do I deal with this scenario?
PS: I know I can version-control the whole WP install, and 'globalize' all the dependencies. That would also mean that I can't really work a theme in isolation.
Beta Was this translation helpful? Give feedback.
All reactions