This repository is the database for the plugin Download List Block with Icons. This provides a Gutenberg block to manage a download list with file type specific icons.
After checkout go through the following steps:
- copy build/build.properties.dist to build/build.properties.
- modify the build/build.properties file - note the comments in the file.
- execute the command in build/:
ant init - after that the plugin can be activated in WordPress
Run npm start to compile the Block Editor-Scripts for tests.
- increase the version number in build/build.properties.
- execute the following command in build/:
ant build - after that you will finde in the release directory a zip file which could be used in WordPress to install it.
The translations are managed on translate.wordpress.org. The repository contains no language files.
npm ci
npm start
npm run build
This also copies the icon fonts of Font Awesome and Bootstrap Icons from node_modules to css/.
Hint: will be called by ant-command mentioned above.
composer install
vendor/bin/phpcs .
vendor/bin/phpcbf .
Hint: this check runs against the VIP-GO-platform which is not our target for this plugin. Many warnings can be ignored.
vendor/bin/phpcs --extensions=php --ignore=*/vendor/*,*/node_modules/*,*/block/*,*/svn/*,*/src/* --standard=WordPress-VIP-Go .
vendor/bin/phpcs -p app --standard=PHPCompatibilityWP --runtime-set testVersion 8.2-
vendor/bin/wp-documentor parse app --format=markdown --output=docs/hooks.md --prefix=downloadlist_ --exclude=Transients.php
The GitHub workflow "Hook documentation" does this automatically on pull requests.
This runs the plugin check as the plugin check in the WordPress repository does on every plugin update. It should result in no errors.
Hint: run this not in the development environment, it would also check all dependencies that is unnecessary. Use a normal WordPress installation with an installed PCP plugin.
wp plugin check --error-severity=7 --warning-severity=6 --include-low-severity-errors --categories=plugin_repo --format=json --slug=download-list-block-with-icons .
The Playwright tests start WordPress in WordPress Playground, activate the plugin, add test content (files, a download list, a folder taxonomy like folder plugins use it and posts with download lists) and check the frontend, the block editor, the settings, the REST API and the abilities.
Requirements: composer install, npm ci and npm run build. Then install the browser once:
npx playwright install chromium
Run the tests:
npm run test:e2e
The WordPress version could be set with the environment variable WP_PLAYGROUND_WP, e.g. WP_PLAYGROUND_WP=6.9 npm run test:e2e (default: latest).
Be sure to have run composer install or composer update before.
Then: composer test-install
composer test
Push a tag with the version number (e.g. 4.1.5). The workflow "Build release zip" builds the zip, checks it with Plugin Check, runs a smoke test in WordPress Playground and creates the release with the notes from changelog.md. The changelog needs a section for this version.