woocommerce / storefront

Official theme for WooCommerce
https://wordpress.org/themes/storefront/
974 stars 470 forks source link

Add exclusion for `/vendor` directory in zip build #2106

Closed danielwrobert closed 1 year ago

danielwrobert commented 1 year ago

The composer archive command previously included the /vendor directory where the .gitignore file excludes it.

This adjusts the exclude array in the composer.json file to omit the /vendor directory from the zip generation.

See this internal conversation for additional context: p1689174493505199-slack-C7U3Y3VMY.

Props to @danieldudzic for discovering the discrepancy!

Screenshots

How to test the changes in this Pull Request:

  1. Run the composer install command which will generate a /vendor folder in the root directory.
  2. Run npm run build and confirm the storefront.zip file is generated.
  3. Confirm that the zip file is ~2.9 mb in size.
  4. Open the generated zip file and confirm that there is no /vendor folder present in the root directory of the theme.

Changelog

Fix – add exclusion for /vendor directory in release zip build.