Development guide

From AlohaWiki

Jump to: navigation, search
Warning
Warning

Some or all information on this page is out of date starting with Aloha Editor Version 0.20 and needs to be updated.


Contents

Welcome to Aloha Editor

This document will serve to help contributors to develop with Aloha Editor. For a implementors and end-user guide refer to the Aloha Editor Wiki.


Before you Start

The License

Aloha Editor is dual licensed for open-source and commercial use. Refer to the document for more information.


Command Line Dependence

The development process surrounding Aloha Editor is highly dependent on the command line. Whenever you see a snippet of commands and the instruction to run them, it's safe to assume that we are instructing you to run them in the command line. On Windows you can start the command line by typing "cmd" then ENTER in the Start Menu. On Unix/OSX distributions you'll want to open up the application called "Terminal".


Installing Pre Requirements

Aloha Pre Requirements

Preparation

Getting your Github Account

1. Before we start you'll need a github account, if you don't have one you can signup for free here: https://github.com/signup/free


Creating your Aloha Editor Fork

  1. We now need to grab a copy of Aloha Editor that is suitable for editing
  1. First you'll need to fork the Aloha Editor repository
    1. To do this go here http://github.com/alohaeditor/Aloha-Editor
    2. Then click the "fork" button
    3. Wait a while, and once it is setup copy the "SSH URL" which will look something like this `git@github.com:balupton/Aloha-Editor.git`. This will be used in the next step.

Checking out Aloha Editor

The following snippets of code should be run in the terminal/command-line

1. Clone Aloha Editor

git clone git@github.com:{YOUR GITHUB USERNAME}/Aloha-Editor.git alohaeditor
cd alohaeditor
git checkout dev
git submodule init
git submodule update
git submodule foreach --recursive git submodule update --init

Note: if this is the first time you are forking something on github you might get this error:

Permission denied (publickey). 
fatal: The remote end hung up unexpectedly"

This means you first have to set up an ssh key pair (see [1]).

Working the Aloha Editor Core

Development Cycle

Our development cycle is explained fantastically http://nvie.com/posts/a-successful-git-branching-model

Branches

master: same as latest stable
dev: latest development (may be broken - but should not)

Tags

v0.9.0: first stable release of branch 0.9
v0.9.1: bugfix release of branch 0.9
v0.9.2: another bugfix release of branch 0.9


Building Aloha Editor

TBD


Editing an Existing Plugin

Creating your Plugin's Fork

  1. Navigate to the Github page for the plugin you would like to edit
    1. Then click the "fork" button
    2. Once the fork has been generated, click the "SSH" url button and make note of this url.
  2. Now ensure you are not inside another git repo (such as your plugin), and run the following commands

Setting up the Existing Plugin for Editing

  cd alohaeditor
  cd src/plugins/{THE PLUGIN'S BUNDLE}/{THE PLUGIN DIRECTORY}
  git checkout dev
  git remote add fork {YOUR FORK'S SSH URL - AS PER THE LAST STEP}

Editing the Existing Plugin

  cd alohaeditor
  cd src/plugins/{BUNDLE DIRECTORY}/{PLUGIN DIRECTORY}
  echo "test" > test.txt
  git add test.txt
  git commit -m "Added test file”
  git push fork

Bundling the Updates with Aloha Editor

cd alohaeditor
git add src/plugins/{THE PLUGIN'S DIRECTORY}
git commit -m "Updated my plugin"

Adding your own Plugin

Creating your Bundle Repository

  1. You'll need to create a git repository for your plugin bundle on github. You can do this here http://github.com/repositories/new
    1. Set the Project Name in this format "Aloha-Bundle-{YOUR BUNDLE NAME}"
    2. The other fields can be anything
  2. Once created make note of it's SSH URL


Adding your new Plugin

For adding a new plugin you should create your own bundle which can contain as many plugins as you wish.

cd alohaeditor
git submodule add {YOUR REPOSITORY URL} src/plugins/{YOUR BUNDLENAME}

Working with your New Plugin

cd alohaeditor
cd src/plugins/{YOUR BUNDLE NAME}
 
echo "test" > test.txt
git add test.txt
git commit -m "added test file"
 
git push origin master


Further Reading


The POWER IS YOURS

regular_expressions.png

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox