Skip to content

[UX] Moving yarn above npm #1200

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

Closed
wants to merge 1 commit into from
Closed

Conversation

ThomasLandauer
Copy link

As at https://symfony.com/doc/current/frontend/encore/installation.html

Q A
Bug fix? no
New feature? no
Tickets
License MIT

@WebMamba
Copy link
Contributor

Haha I think npm was above yarn just because it's more popular, but yes I think yarn is more popular in this community so let's put it above! 😁

@weaverryan
Copy link
Member

I've been putting npm first these days simply because it is something that is already installed for users with node. That lowers the barrier of entry. If we're going to make it consistent, I'd vote for putting npm first.

yarn is likely common in our community because that's what we started recommending when Encore came out. But back then, I'm not sure that npm even had its lock file yet. These days, I don't have much a preference between the two - hence wanting to recommend the one that comes pre-installed with node.

@smnandre
Copy link
Member

Would it be possible to use a toggler/segmented control like the "configuration bloc" ? Ideally that would remember the choice made by the user ?

That could ease a lot the reading

config-bloc

@Kocal
Copy link
Member

Kocal commented Oct 25, 2023

Don't forget about pnpm and bun :trollface:

@smnandre
Copy link
Member

smnandre commented Oct 28, 2023

You cannot imagine how the front-end wars does not concern me (especially when you consider the basic install commands we would ask any user to run are exactly the same...)

But right now, it would be a blind lie to pretend Yarn is on the rise... and.. whatever "userbase" UX could have today, npm is (sadly or not is not my point) the de facto tool everyone has.

So i'm 100% to write documentation with choices "yarn / npm / pnpm / bread / burger-bread" .... as long as the default displayed one is the default installed one.

And even you, right now, reading this message, i'm pretty sure you did not expect those usage statistics.

  • npm vs yarn .... ("yes but you have to install npm to install yarn".... if we don't see how this is itself a reason..... let's look the next line :p )
  • yarn vs pnpm vs vite

Who can stand and say "yarn is on the rise" right here right now will have my eternal respect.

(please note i have no personal opinion on those tools... Mootools was the only one <3 )

Right now, i strongly beleive we have to use the tool everyone has. And even if i'm not sure it's a good thing...... today this tool is npm.

Capture d’écran 2023-10-28 à 23 47 02

@weaverryan
Copy link
Member

Forgetting about the order. Is it even common to show npm and yarn these days? Are there any popular projects showing their install with both? At this moment, I'd prefer to ONLY show npm.

ThomasLandauer added a commit to ThomasLandauer/symfony-docs that referenced this pull request Nov 28, 2023
Page: https://symfony.com/doc/5.4/frontend/encore/advanced-config.html

This is just to check if you really want to drop yarn, as discussed in symfony/ux#1200

If you merge it, I will remove all other occurrences :-)
Kocal added a commit that referenced this pull request Oct 12, 2024
This PR was merged into the 2.x branch.

Discussion
----------

Remove yarn commands in documentations

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Issues        | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

<!--
Replace this notice by a description of your feature/bugfix.
This will help reviewers and should be a good start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - For new features, provide some code snippets to help understand usage.
 - Features and deprecations must be submitted against branch main.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
 - Never break backward compatibility (see https://symfony.com/bc).
-->

Alternative to #1200, for the same reasons explained in symfony/symfony-docs#19348, we don't want to keep `yarn` commands.

Commits
-------

88a3c73 Remove yarn commands in documentations
@Kocal
Copy link
Member

Kocal commented Oct 12, 2024

Closing in favor of #2263, where yarn commands have been removed.

Anyway, thanks for the contribution :)

@Kocal Kocal closed this Oct 12, 2024
@ThomasLandauer ThomasLandauer deleted the patch-1 branch October 12, 2024 11:02
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.

5 participants