Document how to preview changes locally
Nobody has claimed this yet.
- Dominant language
- JSON
- Stars
- 5.8k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 186
Description
Yesterday in https://chat.mozilla.org/#/room/#mdn:mozilla.org @Elchi3 shared how to preview changes of BCD locally. I've tried it out locally and it boils down to this:
Check out https://github.com/mdn/browser-compat-data, https://github.com/mdn/content and https://github.com/mdn/yari in the same directory. Then:
cd path/to/yari
yarn add link:../browser-compat-data
echo CONTENT_ROOT=../content/files > .env
yarn dev
Then find a page that includes the BCD table you've changed, which in my case is http://localhost:3000/en-US/docs/Web/API/DOMPoint#browser_compatibility.
Changes to BCD require stopping and starting the server.
Documenting this for all contributors would be nice. Even nicer would be wrapping it into something like npm run preview which would generate a page with any modified tables and open that. It would be a small step from there to providing preview as part of the CI system.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing preview workflow across the browser-compat-data, content, and yari repositories, using the listed yarn commands and localhost page as the entry point. Document the local BCD preview steps for contributors, including the need to restart the server after BCD changes; any preview command or CI extension is a broader follow-up.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100