Closed michealengland closed 4 years ago
Update
We have a scaffolding command available now. You can use the command
npm init @donmhico/wds-block <Namespace>/<BlockName>
<Namespace>
is a placeholder for the Namespace.
<BlockName>
for the block name.
An actual example is
npm init @donmhico/wds-block WebDevStudios/SampleBlock
Note If you are having problems with it, try to use the latest version of npm and node.
TODO
npm init @webdevstudios/wds-block
instead of my name.Links https://www.npmjs.com/package/@donmhico/create-wds-block https://github.com/donmhico/create-wds-block
Update
The first version of the scaffolding command is now available: https://github.com/WebDevStudios/create-block https://www.npmjs.com/package/@webdevstudios/create-block
You can scaffold a block using the command
npm init @webdevstudios/block WebDevStudios/SampleBlock
At the moment, i'm re-creating the scaffolding package from scratch. I had a discussion with @salcode and @michealengland that the current way that the scaffolding package fetches the actual Block Starter files from this repo isn't ideal. This is because the current scaffolding package has the Block Starter files as templates, so when the WDS Block Starter files updates, the scaffolding package also needs to be updated.
The ideal solution is to have the scaffolding package fetch the WDS Block Starter files from this repo on-demand. I'm currently in the process of creating this. I'll provide updates as soon as possible.
This can be closed. Check out our block starter with:
npx @webdevstudios/block YourName/YourBlock
Similar to https://www.npmjs.com/package/@wordpress/create-block, it would incredibly helpful is users did not have to manually scaffold the WDS Block Starter plugin when starting a new project.
Guidelines