As part of the upgrade to CodeMirror 6, CodeMirror now uses an asset bundler, so during development you'll need to run a script to assemble the frontend assets.
Use of CodeMirror 6 is controlled by the
wgCodeMirrorV6 configuration setting, or by
cm6enable=1 in the URL query string.
You can find the v6 frontend source files in
src/, the compiled sources in
resources/dist/, and other frontend assets managed by ResourceLoader in
NOTE: Consider using Fresh to run these tasks.
npm installto install dependencies.
npm startto run the bundler in watch mode, reassembling the files on file change. You'll want to keep this running in a separate terminal during development.
npm run buildto compile the production assets. You must run this step before sending the patch or CI will fail (so that sources and built assets are in sync).
npm run test:lintfor linting of JS/LESS/CSS.
npm run test:lint:stylesfor linting of just Less/CSS.
npm run test:i18nfor linting of i18n messages with banana-checker.
npm run test:unitfor the new Jest unit tests.
npm run selenium-testfor the Selenium tests.
npm run test:bundlesizeto test if the gzip'd entrypoint is of acceptable size.
Older QUnit tests are in
resources/mode/mediawiki/tests/qunit/. These will
eventually be moved over to
tests/qunit and rewritten for CodeMirror 6.