docs icon indicating copy to clipboard operation
docs copied to clipboard

Where/how to add 3rd party PHP packages used by wprig components in the /inc folder?

Open seanrasmussen opened this issue 6 years ago • 3 comments

I notice that the composer vendor folder is not included in the production build....

Say I have a package that I want to use in a component, do I use a normal composer/vendor install, or do I manually copy the files into the component folder?

Some docs on this workflow would be great!

seanrasmussen avatar Sep 22 '19 13:09 seanrasmussen

I notice that the composer vendor folder is not included in the production build

I've been thinking about this and I think the best approach would be for the production build step to copy composer.lock to the production build directory then run composer install --no-dev, rather than copying the vendor directory.

If I make a PR that does that, can you help test it @seanrasmussen?

ataylorme avatar Sep 27 '19 15:09 ataylorme

Sure, I'd be happy to help test it... with the disclaimer that I am a bit new to OOP PHP :-)

Just curious -- would that mean that the bundle.zip would also have the vendor (production) folder?

seanrasmussen avatar Sep 27 '19 16:09 seanrasmussen

would that mean that the bundle.zip would also have the vendor (production) folder?

Yes, it would since the .zip is created at the end of the production build.

ataylorme avatar Sep 27 '19 16:09 ataylorme