In this how-to guide, we will be going over how to test your block changes before updating the block on your live store.
Make the code changes to your block that you'd like to test.
Use your terminal to navigate to the home directory of your block. You'll know it's the correct directory because you'll see a .element-block file there.
Run this command in your terminal:
npm run build
If you encounter any errors executing this command, you must fix the errors before proceeding.
Run this command in your terminal:
element update
If the command is successful, you'll see output like this:
Updated Myblock v1 for staging
ID 235840673211303883
Log in to volusion.com and navigate to Site Designer.
From Site Designer, click the Preview button to preview your theme.
Your changes are live for you to observe and test, but are not released to your block users.
Repeat steps 1 (Make Changes to Your Block), 2 (Build Your Block), and 3 (Update Your Block) to update your block in Staging.
Then, test your changes and make more changes if necessary.
When you are ready, you can return to your terminal and run this command to release your changes to your block users:
element release
Note: Releasing will affect your block users.