WordPress block that displays the current post/page password form.
Reviewing this plugin, or want to submit a PR? Here's how to get set up after cloning/downloading the plugin into your WordPress install:
- Install composer dependencies:
composer install
- Install WordPress coding standards library:
composer run-script install-codestandards
- Refresh the composer autoloader:
composer dump-autoload
- Install node packages:
npm install
(we use Node 14.x with NPM 6.x) - If you're using VS Code, there's a
settings.sample.json
in.vscode
for a head start on getting Intelephense and PHPCS/WPCS integrated with your editor - Spin up build scripts for editor, front end, and dynamic asset dependency management (via @wordpress/scripts):
npm start
- Check against WordPress project standards with
composer run-script phpcs
,npm run lint:css
, andnpm run lint:js
- Build production-ready, minified assets with
npm run build
The setup here is somewhat dependent on your environment.
- Do "Contributing" steps above.
- Install Docker and Docker Compose.
- Make sure your Docker service is running. Some Debian Linux distributions may not have a typical
init
orsystemd
and needsudo service docker start
. You may also need to allow your user to use docker. - Run
npm run env:start
. If you don't already have WordPress testing dependencies installed, you may have to execute thebin/install-wp-tests.sh
script (ex:bash bin/install-wp-tests.sh
). - Run
composer run-script test
for PHP unit and integration tests. Some tests may need their snapshots updated, depending on the changes that are made. - Run
npm run test:e2e
for JavaScript end-to-end tests. If you get issues loading the puppeteer module, runnpm cache clean --force
, delete thenode_modules
folder, then runnpm install
(Trac #52843). - Run
npm run test:unit
for JavaScript unit tests.