Skip to content

feat: convert npm to yarn commands on docs #784

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

Merged
merged 2 commits into from
Aug 9, 2022

Conversation

semoal
Copy link
Contributor

@semoal semoal commented Mar 17, 2021

Hey folks 👋

I've introduced this little plugin to introduce automatic conversion of npm commands to yarn.

Demo:

Kapture 2021-03-17 at 14 55 52

@eps1lon
Copy link
Member

eps1lon commented May 5, 2021

Thanks for the suggestion.

Since the change from npm to yarn is quite trivial and this plugin isn't trivial we just stick with npm for now.

@nickserv
Copy link
Member

Personally I think this would be worth reopening. New users don't necessarily know how to translate npm commands to yarn commands, and from a maintenance perspective this remark transformer makes it much easier to add both sets of commands to our docs (compared to manually adding Tabs, TabItems, and Yarn examples to each document).

@semoal
Copy link
Contributor Author

semoal commented Jul 20, 2021

Now, this is even easier... because Docusaurus ships the plugin I've implemented here but inside a module.
https://www.npmjs.com/package/@docusaurus/remark-plugin-npm2yarn

If you're all agree, I can adjust the pull request adding this module. 👍

@nickserv
Copy link
Member

nickserv commented Jul 20, 2021

That sounds like a good idea, let's reopen it to try it out, and we can review it again.

@nickserv nickserv reopened this Jul 20, 2021
@semoal semoal force-pushed the npm-2-yarn branch 2 times, most recently from fe250ab to 6a9e885 Compare July 20, 2021 18:33
@semoal
Copy link
Contributor Author

semoal commented Jul 20, 2021

@nickmccurdy Done mate!

Noticed one issue with one link:

warn Docs markdown link couldn't be resolved: (dom-testing-library/api-helpers.mdx) in /Users/sergio.moreno/OSS/testing-library-docs/docs/preact-testing-library/learn.mdx for version current

But not sure where it should point, I can fix it if you give me some extra details.

Also could be interesting to update the netlify node version: 10 is not longer maintained.

8:34:25 PM: You are using Node.js v10.24.1. We require Node.js >=12.13.0 or up!

@eps1lon
Copy link
Member

eps1lon commented Aug 5, 2022

@semoal Could you rebase this? We're still interested in landing this.

@netlify
Copy link

netlify bot commented Aug 5, 2022

Deploy Preview for testing-library ready!

Name Link
🔨 Latest commit 150e1c1
🔍 Latest deploy log https://app.netlify.com/sites/testing-library/deploys/62ecd0f3f0d9d4000848006c
😎 Deploy Preview https://deploy-preview-784--testing-library.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@timdeschryver timdeschryver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened a few pages and this looks good to me.

@eps1lon eps1lon merged commit 2978f4a into testing-library:main Aug 9, 2022
@eps1lon
Copy link
Member

eps1lon commented Aug 9, 2022

@all-contributors add @semoal for code

@allcontributors
Copy link
Contributor

@eps1lon

I've put up a pull request to add @semoal! 🎉

@semoal semoal deleted the npm-2-yarn branch August 9, 2022 20:22
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.

4 participants