Closed bobbingwide closed 4 years ago
Whatever I choose will npx @wordpress/create-block
enable me to create a new single block plugin with all the right names?
Trying it out with "on-this-day"
C:\apache\htdocs\wordpress\wp-content\plugins>npx @wordpress/create-block
npx: installed 204 in 20.79s
(node:50520) ExperimentalWarning: The fs.promises API is experimental
? The block slug used for identification (also the plugin and output folder name): on-this-day
? The internal namespace for the block name (something unique for your products): oik-sb
? The display title for your block: On this day
? The short description for your block (optional): Display 'On this day' in history related content
? The dashicon to make it easier to identify your block (optional): calendar-alt
? The category name to help users browse and discover your block: widgets
? The name of the plugin author (optional). Multiple authors may be listed using commas: bobbingwide
? The short name of the plugin’s license (optional): GPL-2.0-or-later
? A link to the full text of the license (optional): https://www.gnu.org/licenses/gpl-2.0.html
? The current version number of the plugin: 0.1.0
Creating a new WordPress block in "on-this-day" folder.
Creating a "block.json" file.
Creating a "package.json" file.
Installing packages. It might take a couple of minutes.
Formatting JavaScript files.
Compiling block.
Done: block "On this day" bootstrapped in the "on-this-day" folder.
Well, that seemed to work. The
The main glitch is:
oik-sb
. on-this-day
, the same name as the plugin.plus... should I mention this somewhere else...
'
wp_set_script_translations
webpack.config.js
file generatedpackage.log.json
be listed in .gitignore
should I mention this somewhere else...
I raised https://github.com/wordpress/Gutenberg/issues/24362 to cover the test-domain issue and added the subsequent notes.
For
No
webpack.config.js
file generated
... this should be covered in https://github.com/WordPress/gutenberg/issues/24321#issuecomment-668513051
I've successfully refactored a clone of sb-children-block
as children
and have updated the documentation in my local environment for oik-plugins.com. The new version is ready to clone when I get confirmation from plugins@wordpress.org that they're happy for me to pick a different name. Now I have to find the appropriate git commands to pull the changes back into this repo, then rename the repo.
Now I have to find the appropriate git commands to pull the changes back into this repo, then rename the repo.
I had a reply from plugins. It said I was too late because my plugin was already approved. I'm still going to do some internal renaming for v1.0.0
Name for | Original name | New Name |
---|---|---|
plugin name | SB Children block | <= |
plugin slug | sb-children-block | <= |
text-domain | sb-children-block | <= |
block prefix | sb | oik-sb |
block name | children-block | children |
block title | Children block | Children |
full block name | sb/children-block | oik-sb/children |
function prefix | sb_children_block | <= |
script and style handle prefix | sb-children-block | <= |
I've updated the issue title to reflect what I've actually done.
Closing this as I've now put the plugin on wordpress.org https://wordpress.org/plugins/sb-children-block/
I've just submitted the
sb-children-block
plugin to WordPress.org and received this standard email response.Thank you for uploading SB Children block to the WordPress Plugin Directory. We will review your submission as soon as possible and send you a follow up email with the results.
Your plugin has been given the initial permalink (aka slug) of sb-children-block based on your display name of SB Children block. This is subject to change based on the results of your review.
If you need to change the plugin permalink, please reply to this email immediately and let us know what the correct slug should be. We will be unable to change your plugin slug once your review is completed.
If there are any other problems with your submission, please reply to this email and let us know right away. In most cases, we can correct errors as long as the plugin has not yet been approved.
I'm now questioning the names I used. Should I rename things, and if so, what to?