nodejs.org icon indicating copy to clipboard operation
nodejs.org copied to clipboard

chore(content): use as 100% new codebox

Open AugustinMauroy opened this issue 2 years ago • 5 comments

Description

Adding possibility to switch between cjs/esm on new codeBox

Related Issues

No related Issues

Check List

  • [X] I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • [X] I have run npx turbo format to ensure the code follows the style guide.
  • [X] I have run npx turbo test to check if all tests are passing.
  • [X] I have run npx turbo build to check if the website builds without errors.
  • NA I've covered new added functionality with unit tests if necessary.

AugustinMauroy avatar Mar 04 '24 15:03 AugustinMauroy

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Mar 4, 2024 3:15pm

vercel[bot] avatar Mar 04 '24 15:03 vercel[bot]

Can you attach a screenshot of an example?

ovflowd avatar Mar 04 '24 20:03 ovflowd

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 100 🟢 96 🟢 100 🟢 91 🔗
/en/about 🟢 100 🟢 97 🟢 100 🟢 92 🔗
/en/about/previous-releases 🟢 98 🟢 95 🟢 100 🟢 92 🔗
/en/download 🟢 100 🟢 95 🟢 100 🟢 91 🔗
/en/blog 🟢 99 🟢 96 🟢 100 🟢 92 🔗

github-actions[bot] avatar Mar 04 '24 20:03 github-actions[bot]

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 85%
80.18% (433/540) 79.65% (137/172) 73.07% (76/104)

Unit Test Report

Tests Skipped Failures Errors Time
88 0 :zzz: 0 :x: 0 :fire: 4.561s :stopwatch:

github-actions[bot] avatar Mar 04 '24 20:03 github-actions[bot]

@ovflowd here you have a record. don't forget you have the preview ;)

https://github.com/nodejs/nodejs.org/assets/97875033/fe888e28-92ab-4fc3-91c4-942b634a97b6

AugustinMauroy avatar Mar 04 '24 20:03 AugustinMauroy

I wouldn't mind the second tab being "ESM" instead - perhaps more recognisable?

I guess it's because on our docs we write "MJS", but I guess ESM would be more friendly for newcomers indeed

ovflowd avatar Mar 06 '24 11:03 ovflowd