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

feat(dlx): yarn create <starter-kit-package> as an alias to yarn dlx create-<starter-kit-package> #1138

Merged
merged 5 commits into from
Apr 2, 2020

Conversation

paul-soporan
Copy link
Member

What's the problem this PR addresses?

yarn create was removed in Yarn v2 as the yarn dlx command got added.

The problem is that many of the starter-kit projects still only list yarn create:

This can cause confusion to people who don't happen to read the CLI page on our website, as there's no other place where this change is mentioned.

You can also consider it as a small Yarn-exclusive QoL change. 😄

How did you fix it?

I added the yarn create command back as a hidden alias to yarn dlx.

yarn create [flags] <starter-kit-package> ... is now an alias to yarn dlx [flags] create-<starter-kit-package> ....

@arcanis
Copy link
Member

arcanis commented Apr 1, 2020

Great! Can you add an integration test? You can just add a create-test-app fixture that generates a hello.txt file, and check whether calling yarn create test-app properly generates the file (and maybe add another test for the scope thing too).

@paul-soporan
Copy link
Member Author

Done. I also fixed tests by changing packages/yarnpkg-core/sources to @yarnpkg/core.

@arcanis arcanis merged commit 4c10925 into yarnpkg:master Apr 2, 2020
@arcanis
Copy link
Member

arcanis commented Apr 2, 2020

Perfect!

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.

2 participants