When pushing submissions to this repo we require that you make a seperate fork for you to make your modification on as you see fit then sent back via a merge request. We do however have some rules surrounding the formatting of your contribution. - All line endings must be LF. - Avoid applying unneccessesary beautificiation - Please provide a detailed reasoning for the reasons why code is removed/rewritten (ie: please link to an issue.) - If adding features, we use MDL + Material icons for redwarn-web. - Please test your changes and explain in detail the intended function of the changes you have made (save us all time)
You can contribute on any operating system, as long as you have PHP (and git, obviously) installed. Execute the following steps in whichever shell you prefer (cmd, PowerShell, bash, etc...)
- Clone this repository to your computer.
git clone https://gitlab.com/redwarn/redwarn-web.git
- Enter the directory of the cloned repository.
cd redwarn-web
- On Wikipedia, disable the active RedWarn version in your
common.js
(or the script for whichever skin you use) by removing or commenting the line which imports it. - Insert the following into your
common.js
mw.loader.load('http://localhost:9696/build.php');
- In the directory of
redwarn-web
, run the following to start the PHP Web Server used to serve the RedWarn script.
php -S localhost:9696
- Every time you edit a file, simply refresh the Wikipedia page and the changes you made will be immediately applied.
- If you want to build a finished script for release, run the following.
php build.php > ./release/redwarn-web.js
NOTE: If you do not use the development server and instead decide to edit directly, RedWarn will not work. Elements will be missing, and the user interface will fail entirely. This is a common mistake made when editing RedWarn.
Happy contributing!
If you add code from an external source/reuse code within Redwarn, please make sure it is compatible with RedWarn's Apache 2.0 License, and make it clear where you got the code from, as this will help us avoid licensing issues down the road.
Report bugs via the issue board or through email [email protected] for more sensitive bugs. Please be detailed in your bug reports, as it will help us to locate the source of the bug and fix it as fast as possible.
Great bug reports tend to have:
- A quick summary and/or background
- A list of steps to reproduce
- An explanation of what you expected would happen
- A summary of what actually happens
- Additional notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
You may use the provided issue templates, which will automatically create the backbone of a report based on these qualities.
Please propose your features via the issue board, appending the issue with the 'feature' label, or via the Wikipedia talk page. Please also be detailed in your proposal so we can determine whether it is feasible or should be implemented.