From a82e6fcbd9ca31d060092d18cae8736da7828933 Mon Sep 17 00:00:00 2001 From: Tyler Bailey Date: Wed, 28 Aug 2024 10:30:05 -0400 Subject: [PATCH 1/2] Add gitattributes file --- .gitattributes | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..63d4e02f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,18 @@ +/.distignore export-ignore +/.gitattributes export-ignore +/.github/ export-ignore +/.gitignore export-ignore +/.nvmrc export-ignore +/.wordpress-org/ export-ignore +/.wordpress-version-checker.json export-ignore +/.wp-env.json export-ignore +/CHANGELOG.md export-ignore +/CODE_OF_CONDUCT.md export-ignore +/CONTRIBUTING.md export-ignore +/CREDITS.md export-ignore +/composer.lock export-ignore +/package-lock.json export-ignore +/phpcs.xml export-ignore +/phpunit.xml.dist export-ignore +/tests/ export-ignore +/webpack.config.js export-ignore From 3dafc13ca53c027233ee4df94072937c27b56114 Mon Sep 17 00:00:00 2001 From: Tyler Bailey Date: Wed, 28 Aug 2024 10:51:06 -0400 Subject: [PATCH 2/2] Add composer archive scripts to exclude dev dependencies --- composer.json | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 17a49c96..452c0931 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,37 @@ "phpcs": "./vendor/bin/phpcs . -p -s", "phpcbf": "./vendor/bin/phpcbf .", "phpcs:compat": "./vendor/bin/phpcs *.php includes -p --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 7.4-", - "test:unit": "./vendor/bin/phpunit" + "test:unit": "./vendor/bin/phpunit", + "pre-archive-cmd": [ + "composer install --no-dev --no-interaction --no-progress --optimize-autoloader" + ], + "post-archive-cmd": [ + "composer install --no-interaction --no-progress" + ] + }, + "archive": { + "exclude": [ + "/.distignore", + "/.github", + "/.gitignore", + "/.wordpress-org", + "/.wp-env.json", + "/.wp-env.override.json", + "/CHANGELOG.md", + "/CODE_OF_CONDUCT.md", + "/composer.json", + "/composer.lock", + "/CONTRIBUTING.md", + "/CREDITS.md", + "/package-lock.json", + "/package.json", + "/phpcs.xml", + "/phpunit.xml.dist", + "/README.md", + "/webpack.config.js", + "/node_modules", + "/tests" + ] }, "config": { "allow-plugins": {