Skip to content

Comments

Add code block titles and npm2yarn#2725

Merged
JLHwung merged 6 commits intobabel:mainfrom
JLHwung:add-code-block-titles-and-npm2yarn
Feb 18, 2023
Merged

Add code block titles and npm2yarn#2725
JLHwung merged 6 commits intobabel:mainfrom
JLHwung:add-code-block-titles-and-npm2yarn

Conversation

@JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Feb 18, 2023

  • Per Nicolò's Slack comments, added code block titles. Some code blocks, mostly Babel configs, are assigned with meaningful names, such as babel.config.js. Others are assigned the language type.

  • Added npm2yarn plugin, now every npm install instruction comes with yarn's equivalent one for free.

@netlify
Copy link

netlify bot commented Feb 18, 2023

Deploy Preview for babel ready!

Name Link
🔨 Latest commit 8983f46
🔍 Latest deploy log https://app.netlify.com/sites/babel/deploys/63f10fbe38b71f0007266a8e
😎 Deploy Preview https://deploy-preview-2725--babel.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

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

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

Awesome! It would be cool if npm2yarn also supported pnpm, but I couldn't find anything on Google.

@JLHwung
Copy link
Contributor Author

JLHwung commented Feb 18, 2023

@nicolo-ribaudo The remark plugin is straightforward:

https://github.com/facebook/docusaurus/blob/main/packages/docusaurus-remark-plugin-npm2yarn/src/index.ts

as long as we can figure out how to transform npm commands to the pnpm equivalents, we can enhance it and use our own plugin.

@JLHwung JLHwung merged commit a607384 into babel:main Feb 18, 2023
@JLHwung JLHwung deleted the add-code-block-titles-and-npm2yarn branch February 18, 2023 18:04
@JLHwung JLHwung mentioned this pull request Apr 11, 2023
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