This is a PoC, based on calypso apps' sync.
This script syncs your local/dev gutenberg instance with your sandbox, so you can test your changes almost in real time.
- In the
gutenberg
folder runnpm run dev
clone
this repo in a different foldernpm i
- Run
node . --localPath=<path to local gutenberg> --watch
The input is the local gutenberg
path. The script is gonna sync the build
folder to your sandbox folder (~/public_html/wp-content/plugins/gutenberg-core/v<version number from gutenberg's package.json>
).
--localPath
: the path to your local gutenberg
--watch
: keep watching for changes in the build
folder
--version
: the target version folder - the default is the version from gutenberg's package.json
Having this file structure:
/home/user/
gutenberg
gutenberg-sandbox-sync
- In
/home/user/gutenberg
runnpm run dev
- In
/home/user/gutenberg-sandbox-sync
runnode . --watch --localPath='../gutenberg'
- Now make changes to the local files and they'll be synced to your sandbox
*Remember to sandbox the site you'll for testing.