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

Add a Composer script namespace option #159

Open
raphaelstolt opened this issue Oct 11, 2016 · 0 comments
Open

Add a Composer script namespace option #159

raphaelstolt opened this issue Oct 11, 2016 · 0 comments

Comments

@raphaelstolt
Copy link
Contributor

The generated Composer script could be namespaced. With a new --composer-script-namespace option the namespace could be injected.

When not set the Composer script namespace should be derived from the project name.

If it's a short name (<=9 characters) it should be taken as is while being lowercased.

 Logger => logger

If it's a long name it should be build from the initial letters while also being lowercased. .

SomeUsefulLibrary => sul
Some-useful-Library => sul
some_Useful_library => sul

Having namespaced Composer scripts adds documentation while also introducing a typing overhead.

> composer 
 sul
  sul:application-version-guard  Run the sul:application-version-guard script as defined in composer.json.
  sul:configure-commit-template  Run the sul:configure-commit-template script as defined in composer.json.
  sul:cs-fix                     Run the sul:cs-fix script as defined in composer.json.
  sul:cs-lint                    Run the sul:cs-lint script as defined in composer.json.
  sul:test                       Run the sul:test script as defined in composer.json.
  sul:test-with-coverage         Run the sul:test-with-coverage script as defined in composer.json.
  sul:travis-lint                Run the sul:travis-lint script as defined in composer.json.

What's your opinion on this?

Should we also namespace the construct Composer scripts?

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

No branches or pull requests

1 participant