Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

Feature: Add template which would support WordPress single block directory #1

Open
gziolo opened this issue Dec 19, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@gziolo
Copy link
Owner

gziolo commented Dec 19, 2019

There is this question from @bph:

If I wanted to use it for a single block plugin, and I see a great use case for it, but it would need boilerplate pluginname.php. I created the file added the header information and move the index.php information to that file. That was easy, so easy, that it might go into the script?

I think we should either add a template that addresses the needs of the single block directory project. An alternative approach would be to add more optional prompts that cover all metadata required by the WordPress plugin.

@gziolo gziolo added the enhancement New feature or request label Dec 19, 2019
@bph
Copy link

bph commented Dec 19, 2019

For the plugin directory, we also need the readme.txt file that holds the information displayed in the WP directory for "Tags" "Installation" "Description" "Screenshot" "Version" etc..

@gziolo
Copy link
Owner Author

gziolo commented Jan 8, 2020

I took the simplest approach possible and added plugin metadata to the PHP file in both templates: es5 and esnext. Related code change:
0d3145d

@bph - do you have a good example of the readme.txt file I could use?

You can test the next version by running inside wp-content/plugins:
npm init wordpress-block@next
npm init wordpress-block@next --template es5

@gziolo gziolo self-assigned this Jan 8, 2020
@bph
Copy link

bph commented Jan 9, 2020

I will check out the new version this week...
Here are two examples of readme text from my favorite plugins.

@ntwb
Copy link

ntwb commented Jan 10, 2020

See also:

"Readme files: To make your entry in the plugin browser most useful, each plugin should have a readme file named readme.txt that adheres to the WordPress plugin readme file standard. You can put your readme file through the readme validator to check it. "
https://wordpress.org/plugins/readme.txt
https://wordpress.org/plugins/developers/readme-validator/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants