User:Lucas Werkmeister (WMDE)/Working on OOUI

When you want to work on the OOUI code itself, e. g. to fix a bug, you typically don’t want to do this from inside MediaWiki: MediaWiki’s source code repository only syncs up with OOUI on each OOUI release, without reflecting the details of the work between releases, and it also merges multiple source code files together, making them harder to navigate.

Instead, you’ll want to set up a simple standalone web page using OOUI. First, in a new directory run  to install its dependencies (though we won’t load OOUI itself from there); then, create an  file like the following (based on the OOUI ToDo App Tutorial:

You’ll place your own code in  and/or , for example:

The HTML file expects to load OOUI from an  directory, so you first need to clone it and set it up:

Then, whenever you’ve made a change to the OOUI source code, run  again to rebuild the files in   that the HTML file loads. (Unfortunately, this takes about 1½ minutes on my system, and includes re-rasterizing all the SVG images to PNG files. This is the part that I’m sure can be improved.)