Skip to:

Changeset 12712 for trunk/package.json

08/30/2020 05:53:06 PM (4 years ago)

Build/Test Tools: include @wordpress/env into BuddyPress

wp-env requires Docker and the latest Node.js LTS version. It gives us a set of new npm commands to easily generate a local WordPress environment to unit test, develop and contribute to BuddyPress code.

To enjoy wp-env, make sure you have SVN or Git, composer, Node.js and Docker installed on your computer. Get the development version of BuddyPress using our SVN repository or its GitHub read-only mirror from this URL:, and use the command to fetch the code locally into a buddypress folder. From your terminal software, move to this folder to install the needed libraries using the following commands.
npm install
composer install

Once done, you can set up your local development environment using this single command:
npm run wp-env start

You can now access to your local environment and finish the WordPress setup (permalinks etc..) from this URL:

The administration credentials are:

  • Username: admin,
  • Password: password

To stop the environment, you can use this command:
npm run wp-env stop

To run PHP unit tests, you can use this command:
npm run test-php

To run PHP unit tests on multisite, you can use this command:
npm run test-php-multisite

You can customize your local development setup using a file named .wp-env.override.json . Our default setup is using the WordPress development version and includes the BP REST plugin. For more details about wp-env, have a look at this documentation page:

Props oztaser, mercime, vapvarun

Fixes #8317

2 edited


  • trunk

    • Property svn:global-ignores

        old new  
  • trunk/package.json

    r12704 r12712  
    99        "@wordpress/babel-preset-default": "~4.10.0",
    1010        "@wordpress/browserslist-config": "~2.1.4",
     11        "@wordpress/env": "~1.6.0",
    1112        "autoprefixer": "~8.5.2",
    1213        "grunt": "~1.1.0",
    4546        "watch:components": "parcel watch src/js/bp-core/js/block-components/block-components.js --out-dir src/bp-core/js --out-file block-components.js --no-source-maps --global bp",
    4647        "dev:components": "parcel build src/js/bp-core/js/block-components/block-components.js --out-dir src/bp-core/js --out-file block-components.js --no-source-maps --no-minify --global bp",
    47         "build:components": "parcel build src/js/bp-core/js/block-components/block-components.js --out-dir build/bp-core/js --out-file block-components.js --global bp"
     48        "build:components": "parcel build src/js/bp-core/js/block-components/block-components.js --out-dir build/bp-core/js --out-file block-components.js --global bp",
     49        "wp-env": "wp-env",
     50        "test-php": "npm run wp-env run phpunit 'phpunit -c /var/www/html/wp-content/plugins/buddypress/tests/phpunit/env.xml'",
     51        "test-php-multisite": "npm run wp-env run phpunit 'phpunit -c /var/www/html/wp-content/plugins/buddypress/tests/phpunit/env.multisite.xml'"
    4852    },
    4953    "keywords": [
Note: See TracChangeset for help on using the changeset viewer.