Examples for how to create an extension. This is not the repo to test out git/gerrit, for that please see the test/* projects.

Clone this repo:
  1. f83771a Fix examples by Timo Tijhof · 5 months ago REL1_42 master
  2. ca2fdbc build: Updating npm dependencies by libraryupgrader · 12 months ago REL1_41
  3. 89a340e Remove deprecated hook by Jon Robson · 10 months ago
  4. a91da77 stylelint: Enable selector-pseudo-element-colon-notation by Umherirrender · 1 year, 1 month ago
  5. 8e30073 build: Updating dependencies by libraryupgrader · 1 year, 1 month ago

Example extension for MediaWiki

The Examples extension is a collection of small example features that implement common extension interfaces in MediaWiki.

The basic structure of this repository is based on the BoilerPlate extension.

Usage

This repository is for reading, and contains verbose guidances and comments along the way. You can freely copy snippets from here. To start your own extension, it is recommended to copy the BoilerPlate extension instead.

Testing

This extension implements the recommended entry points of Wikimedia CI for PHP and Front-end projects.

Before you can test and build code locally, you need:

PHP

To run the PHP code checks and unit tests:

  • Run composer update

This will install testing software to vendor/ in the current directory.

Now, run compose test whenever you want to run the automated checks and tests.

Front-end

To run the checks for JavaScript, JSON, and CSS:

  • Run npm install

This will intall testing software to node_modules/ in the current directory/

Now, run npm test to run the automated front-end code checks..

Contributing

git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/examples.git