Monorepo: speedup.

This commit is contained in:
Vladimir Reznichenko 2024-09-19 15:11:47 +02:00
parent 49957200fc
commit 869164f606
2 changed files with 3 additions and 9 deletions

View File

@ -24,21 +24,16 @@ fi
# We running the optimization in background to speedup build process, with dev-environments in mind.
# Building zips enforcing the optimization during the install process, so we are good around building releases as well.
output 3 "Updating autoloader classmaps..."
composer dump-autoload --optimize --quiet &
output 2 "Done"
composer dump-autoload --optimize --quiet &
if [ -z "$SKIP_UPDATE_TEXTDOMAINS" ]; then
# Convert textdomains
output 3 "Updating package PHP textdomains..."
# Replace text domains within packages with woocommerce
pnpm packages:fix:textdomain
output 2 "Done!"
# output 3 "Updating package JS textdomains..."
# find ./packages/woocommerce-blocks \( -iname '*.js' -o -iname '*.json' \) -exec sed -i.bak -e "s/'woo-gutenberg-products-block'/'woocommerce'/g" -e "s/\"woo-gutenberg-products-block\"/\"woocommerce\"/g" {} \;
node ./bin/package-update-textdomain.js
fi
# Cleanup backup files
find ./packages -name "*.bak" -type f -delete
find ./packages -name "*.bak" -type f -delete &
output 2 "Done!"

View File

@ -48,7 +48,6 @@
"lint:php:fix": "composer run-script phpcbf",
"make:collection": "pnpm exec wc-api-tests make:collection",
"makepot": "composer run-script makepot",
"packages:fix:textdomain": "node ./bin/package-update-textdomain.js",
"test": "pnpm test:unit",
"test:api": "pnpm test:e2e:default --project=api --workers 4",
"test:e2e": "pnpm test:e2e:default --project=ui",