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

[5.x] Add default config for select starter kit modules #11045

Open
wants to merge 5 commits into
base: 5.x
Choose a base branch
from

Conversation

jesseleite
Copy link
Member

@jesseleite jesseleite commented Nov 2, 2024

This PR adds a default config, to help with module installation flow when spamming the enter key, or when running non-interactively. More specifically...

For standard confirmation-style modules (where user selects yes/no):

  • default: true will ensure it gets installed when spamming enter or running non-interactively
  • prompt: false will skip the confirmation prompt altogether, forcing the module to be installed

For select-style modules with options (where user selects A or B or C):

  • default: antlers will ensure the antlers modules gets installed when spamming enter or running non-interactively
  • skip_option: false will disable the option to skip the prompt altogether
    • if runing interactively, this forces the user to select an option
    • if running non-interactively, the default option will be installed

Examples...

modules:
  seo:
    default: true  # this still allows user to opt out, but defaults 'yes' when spamming enter or running non-interactively
    dependencies:
      - statamic/seo-pro
  js:
    default: mootools  # this will ensure the mootools module option gets installed if run non-interactively
    skip_option: false  # you can specify string for skip option label, or `false` to force user to select an option
    options:
      vue:
        label: 'VueJS'
        export_paths:
          - resources/js/vue.js
      react:
        label: 'ReactJS'
        export_paths:
          - resources/js/react.js
      mootools:
        label: 'MooTools (will never die!)'
        export_paths:
          - resources/js/mootools.js

TODO:

  • Finish implementation
  • Test coverage
  • Docs PR

@jesseleite jesseleite marked this pull request as draft November 2, 2024 22:30
@jesseleite jesseleite changed the title Add default config for select starter kit modules [5.x] Add default config for select starter kit modules Nov 2, 2024
@jesseleite jesseleite marked this pull request as ready for review November 11, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant