User:Mooeypoo/VisualEditor:Getting Started

Here's the process of getting started with VisualEditor development.

Preliminaries
If you're under Windows, I found that the best course of action for me was to install Ubuntu in a Virtual Machine. However, there are other options, like running git for windows and mediawiki-vagrant. Vagrant didn't work for me (mainly because of several issues with Git under Windows8) so VirtualMachine was a good solution for me.

VirtualMachine
Download your flavor of Virtual Machine (if you have Windows 8, Hyper-V is included, or you can choose the free Oracle VirtualBox).

The process is fairly straight forward, just follow the instructions:
 * Installing Ubuntu in Hyper-V (Windows 8)
 * Installing Ubuntu in VirtualBox

MediaWiki Development
In order to start out with MediaWiki development, you will need a MediaWiki developer access. You can request one in here.

Note: This may sound ridiculous to the experienced users, but it wasn't immediately clear for me: When you sign up for a development account, the field "Instance shell account" is the username you will use in your shell in git. It's public, so, unlike me, try to find something that makes sense, like your username.

Install Git and Gerrit-Review
Follow the instructions in this page to install Git, SSH keys and Gerrit Review. Make sure you submit your new SSH Keys (as the tutorial points out) to your gerrit account settings.

Parsoid
Go into your new mediawiki core installation, into /extensions/ and clone the Parsoid repository: git clone ssh://USERNAME@gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid.git

Install node.js
So, we're supposed to be using nodejs v0.8 and not the latest nodejs. That is a little trickier than expected for us newbies, especially since "nodejs-legacy" (like the Parsoid page suggests) doesn't quite seem to download the proper version.

Here's what worked for me (hat tip Amir Aharoni)

Get nodeJS from its GitHub repository:

I did this in the home folder so I don't mix nodejs repository with the Parsoid repository. git clone https://github.com/joyent/node.git Switch to the v0.8 branch/tag: git checkout v.0.8.0 Configure and install: ./configure make sudo make install And just to make sure nodejs was successfully installed, run node -v If you get the response "v0.8.0" you're good to go.

Set up Parsoid
Go back to your Parsoid extension (if you're not already there) and into mediawiki-core/extensions/Parsoid/js folder. Finish up the installation with: npm install After that's done, you will have to run the server. Type this: node api/server.js To run Parsoid. You'll have to run parsoid every time you restart your system. Remember the above command.