Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yo commands could group generated content into 'components' using a folder structure. #130

Open
aubreypwd opened this issue Feb 18, 2017 · 2 comments

Comments

@aubreypwd
Copy link
Contributor

aubreypwd commented Feb 18, 2017

Right now when you use a command such as yo plugin-wp:include <include-name> you end up with a class-<prefix>-<thing).php file in the includes/class...php folder. It would be nicer to create a folder when this happens:

includes/
    <component>/
        class-<prefix>-<thing>.php

This would allow us to create other sub-classes under a 'component' folder w/out having to do some funky changes to make that possible. This way I can easily create another includes folder in the 'component' folder, which can contain other classes, files, etc that I can include separately.

includes/
    <component>/
        class-<prefix>-<component>.php
            includes/
                 class-<prefix>-<component>-another-thing.php
                 template-tag.php
                 extras.php

Would also like to get some feedback before I attempt this.

@aubreypwd aubreypwd self-assigned this Feb 18, 2017
@aubreypwd aubreypwd changed the title yo commands could group generated content into 'components'. Yo commands could group generated content into 'components' using a folder structure. Feb 18, 2017
@binarygary
Copy link
Contributor

I think this harkens to a discussion we've had internally at WDS on dev calls.

At the moment one of the issues with the plugin-gen on larger projects is conflicts in the primary plugin file as we multiple devs scaffold different includes (see #135 ).

The issue at hand is does the use case you suggest indicate that perhaps multiple plugins would be better?

@binarygary
Copy link
Contributor

@aubreypwd What are your thoughts on namespacing in addition to using something like

  • includes
    -- widgets
    -- CPT
    -- Taxonomies

This would add some structure and allow us to still separate into a looser component structure.

Your thoughts?

@aubreypwd aubreypwd removed their assignment Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants