Skip to content

Better support for kebab-case targets #311

Open
@moorereason

Description

I haven't seen this discussed before, so I wanted to open a discussion.

In my experience, most Makefiles that are not just cramming words together (e.g. installhtml, installps) use kebab-cased targets (e.g. install-html, install-ps) instead of camelCased targets (e.g. installHtml, installPs). It would be helpful in migrating existing Makefiles and teams to mage if mage could more easily accommodate this pattern.

I'm aware that aliases can help here, but mage Help output only shows the primary targets after running them through the lowerFirst template func.

Two ideas:

  1. Add an option to show an alias (if one exists) instead of the primary, lowerFirst target in the Help output. The user could just setup kebab-cased aliases for multi-word targets and the Help output would play along.
  2. Add an option to use kebab-casing by default instead of lowerFirst. This would avoid the need for manual aliases from option 1.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions