A build-block npm script
Last Cloud Blocks release (1.0.7) allows the upload of custom blocks via zip files.
Would be nice that generated blocks have a build-block script to create the zip file (which should include the build folder and package.json file at least).
My suggestion:
~~"build-block": "zip -r [block-name].zip build package.json"~~
"scripts": {
"build-block": "cd .. && zip -r [block-name]/[block-name].zip [block-name]/build [block-name]/package.json"
}
Nice, but I'm also thinking: If you are familiar with the command line, you wouldn't upload a zip. You would edit .gitignore and add the block to your repo. Right?
If you want to keep the blocks inside the wp project, editing the .gitignore is the right way.
But if you want to keep them in different repositories and upload the blocks through the UI, a build-block script could be useful.
To upload just a block, you don't have to update the whole site, just have to generate the block zip file and upload it.
For the block developer, it's just another npm command:
npm run build-block