feat(scripts): migrate commands to new rari build system #37788
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Migrates the following commands to the new rari build system:
yarn build
✱yarn content
yarn start
✱✱Note
✱ The
build
command now implies the (now removed)-n
parameter, and only buildsindex.json
files.To render
index.html
files, runyarn yari-render-html
after the build.✱✱ The
start
command is equivalent to thestart:rari
command, which is now deprecated.The existing commands, using the old yari build system, are preserved with a
:legacy
suffix for now:yarn build:legacy
yarn content:legacy
yarn start:legacy
Warning
These legacy commands are deprecated, and will be removed soon.
Motivation
MDN is already being deployed using rari since December 17, 2024, and this change makes sure every writer sees the content as it will appear on MDN.
Note
Rari only replaces the build parts of yari, namely the
build
,content
,kumascript
,markdown
, andtool
directories.For now, yari still provides MDN's frontend code (
client
), and the filecheck (filecheck
), which hasn't been ported yet.The most important changes from a writer's perspective are:
Tip
✱ Try running
yarn build
without any parameter. This should build all en-US pages in less than a minute (or in about 10 seconds on a Macbook Pro M1 or later).Additional details
Running any of the migrated commands will print an informational message at the top:
Running any of the legacy commands will print a deprecation message at the top:
Related issues and pull requests
Part of MP-1856 (Mozilla-internal).