woocommerce/plugins/woocommerce-beta-tester/src/tools
Paul Sealock 1aec706943 Run linter on all js files 2022-06-08 13:58:25 +12:00
..
commands Run linter on all js files 2022-06-08 13:58:25 +12:00
data Run lint:fix on js 2022-06-08 13:39:59 +12:00
README.md Move admin tester folders to root 2022-06-07 15:18:37 +12:00
index.js Run lint:fix on js 2022-06-08 13:39:59 +12:00

README.md

Tools

Adding a New Command

  1. Open commands.js and add a new object with command, description, and action keys. Action value must be a valid function name.
  2. Open data/actions.js and add a function. The function name must be the value of Action from the first step.

Sample function:

export function* helloWorld() {
	yield runCommand( 'Hello World', function* () {
        console.log('Hello World');
	} );
}
  1. Run npm start to compile and test.