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

Allow creation of "flat" modules #12

Closed
weierophinney opened this issue Jul 26, 2021 · 1 comment · Fixed by #13
Closed

Allow creation of "flat" modules #12

weierophinney opened this issue Jul 26, 2021 · 1 comment · Fixed by #13
Labels
Enhancement New feature or request
Milestone

Comments

@weierophinney
Copy link
Contributor

Feature Request

Q A
New Feature yes
RFC no
BC Break no

Summary

When creating a new application from the skeleton app, users are prompted with regards to the preferred directory structure they want for the "App" module. They can choose from no modules created, to the default of using a "flat" structure (creates src/App/, and puts only PHP class files in it) or the "recommended" structure (creates src/App/ with additional src and templates directories beneath it; class files are under src/App/src/).

Currently, the "module:create" command creates a "recommended" module structure:

- src/
  - {ModuleName}
    - src/
      - ConfigProvider.php
    - templates/

Considering the skeleton offers a "flat" structure as well, I recommend we add an option to the module:create command to create a "flat" module:

- src/
  - {ModuleName}
    - ConfigProvider.php

When doing so, the ConfigProvider should omit the "templates" configuration.

I recommend the option name --flat for this.

@weierophinney weierophinney added the Enhancement New feature or request label Jul 26, 2021
@weierophinney weierophinney added this to the 2.0.0 milestone Jul 26, 2021
@weierophinney weierophinney linked a pull request Jul 27, 2021 that will close this issue
@weierophinney
Copy link
Contributor Author

Completed with #13, to release with 2.0.0.

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

Successfully merging a pull request may close this issue.

1 participant