Run a Script

You can also manually run a script whenever you need using the CLI, to test its execution.

You can list the scripts available in the project directory by navigating to the directory and executing either of the following CLI commands:

copy
$
catalyst run-script | run

The CLI will display the lifecycle and custom scripts that are configured and available for each component in the catalyst.json file.

CLI Run Script


You can directly run a script by executing the run command with the script’s name as shown below:

copy
$
catalyst run-script | run [command]

For example, to run the custom script packageJson , execute the following command from the project directory:

copy
$
catalyst run client:packageJson

This will execute the packageJson script defined in the example.

CLI Run Script

Last Updated 2023-12-14 16:25:23 +0530 +0530

ON THIS PAGE