From 833f2ed58fd39514bf1b916a4a89b67ffde8d054 Mon Sep 17 00:00:00 2001 From: Erik Golinelli Date: Mon, 8 Jan 2024 12:16:34 +0100 Subject: [PATCH] enhanced plugin bundle --- .husky/pre-commit | 2 +- admin/index.php | 1 - composer.json | 4 +- composer.lock | 20 ++-- core/index.php | 1 - languages/cf7-antispam.pot | 2 +- package.json | 145 ++++++++++++++-------------- phpcs.ruleset.xml => phpcs.xml.dist | 0 8 files changed, 88 insertions(+), 87 deletions(-) delete mode 100644 admin/index.php delete mode 100644 core/index.php rename phpcs.ruleset.xml => phpcs.xml.dist (100%) diff --git a/.husky/pre-commit b/.husky/pre-commit index 680ecde..15ba199 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,5 +1,5 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -php vendor/bin/phpcbf --standard=.phpcs.xml.dist --report=summary +php vendor/bin/phpcbf --standard=phpcs.xml.dist --report=summary npm run lint:js diff --git a/admin/index.php b/admin/index.php deleted file mode 100644 index 49d255d..0000000 --- a/admin/index.php +++ /dev/null @@ -1 +0,0 @@ -=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -854,7 +856,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -878,9 +880,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.0" }, - "time": "2023-12-10T21:03:43+00:00" + "time": "2024-01-07T17:17:35+00:00" }, { "name": "phar-io/manifest", diff --git a/core/index.php b/core/index.php deleted file mode 100644 index 49d255d..0000000 --- a/core/index.php +++ /dev/null @@ -1 +0,0 @@ -=16.0.0", - "npm": ">=6.9.0" - }, - "browserslist": [ - "extends @wordpress/browserslist-config", - "Safari > 8", - "IE > 10" - ], - "stylelint": { - "extends": [ - "@wordpress/stylelint-config", - "@wordpress/stylelint-config/scss" - ] - }, - "prettier": "@wordpress/prettier-config" -} +{ + "name": "cf7-antispam", + "author": "Erik Golinelli", + "license": "GPL-2.0-only", + "version": "0.6.0", + "description": "AntiSpam for Contact Form 7", + "files": [ + "admin/*", + "assets/icon.svg", + "build/*", + "core/*", + "engine/*", + "includes/*", + "vendor/*", + "languages/cf7-antispam.pot", + "languages/readme.txt", + "cf7-antispam.php", + "LICENSE", + "readme.txt" + ], + "scripts": { + "start": "wp-scripts start", + "build": "wp-scripts build", + "preplugin-zip": "wp-env run cli --env-cwd=wp-content/plugins/cf7-antispam \"composer install --no-dev && composer dump-autoload --optimize\"", + "plugin-zip": "wp-scripts plugin-zip", + "postplugin-zip": "wp-env run cli --env-cwd=wp-content/plugins/cf7-antispam \"composer install\"", + "lint:css": "wp-scripts lint-style ./src/**/*.scss --fix", + "lint:js": "wp-scripts lint-js ./src/**/*.js --fix", + "packages-update": "wp-scripts packages-update", + "wp-env:start": "wp-env start", + "wp-env:stop": "wp-env stop", + "wp-env:destroy": "wp-env destroy", + "test:e2e": "wp-scripts test-e2e", + "test:e2e:watch": "npm run test:e2e --watch", + "postinstall": "husky install", + "makepot": "wp i18n make-pot . languages/cf7-antispam.pot --exclude=node_modules,vendor", + "PHPCS": "wp-env run composer \"composer PHPCS\"", + "test:unit:php": "wp-env run tests-wordpress /var/www/html/wp-content/plugins/cf7-antispam/vendor/bin/phpunit -c /var/www/html/wp-content/plugins/cf7-antispam/phpunit.xml.dist --verbose" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/erikyo/contact-form-7-antispam.git" + }, + "bugs": { + "url": "https://github.com/erikyo/contact-form-7-antispam/issues" + }, + "homepage": "https://github.com/erikyo/contact-form-7-antispam#readme", + "devDependencies": { + "@wordpress/e2e-test-utils": "^10.19.0", + "@wordpress/env": "^9.0.0", + "@wordpress/eslint-plugin": "^17.5.0", + "@wordpress/scripts": "^26.19.0", + "chart.js": "^4.4.1", + "expect-puppeteer": "^9.0.2", + "husky": "^8.0.3" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=6.9.0" + }, + "browserslist": [ + "extends @wordpress/browserslist-config", + "Safari > 8", + "IE > 10" + ], + "stylelint": { + "extends": [ + "@wordpress/stylelint-config", + "@wordpress/stylelint-config/scss" + ] + }, + "prettier": "@wordpress/prettier-config" +} diff --git a/phpcs.ruleset.xml b/phpcs.xml.dist similarity index 100% rename from phpcs.ruleset.xml rename to phpcs.xml.dist