Add script to build plugin zip

This commit is contained in:
Rebecca Scott 2021-03-29 15:29:24 +10:00
parent 8a4aface8b
commit 1de531e486
2 changed files with 16 additions and 1 deletions

14
bin/build-zip.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
rm woocommerce-admin-test-helper.zip
echo "Building"
npm run build
echo "Creating archive... 🎁"
zip -r "woocommerce-admin-test-helper.zip" \
woocommerce-admin-test-helper.php \
plugin.php \
build/ \
api/ \
README.md

View File

@ -17,7 +17,8 @@
"packages-update": "wp-scripts packages-update",
"start": "wp-scripts start",
"test:e2e": "wp-scripts test-e2e",
"test:unit": "wp-scripts test-unit-js"
"test:unit": "wp-scripts test-unit-js",
"zip": "./bin/build-zip.sh"
},
"devDependencies": {
"@woocommerce/dependency-extraction-webpack-plugin": "1.4.0",