import OpenSeadragon from 'OpenSeadragon';
import context from './context/context';
import annotations from './annotations/annotations';
import state from './state/state';
import draw from './state/draw';
import controls from './controls/controls';
import overlay from './overlay/overlay';

export default OpenSeadragon.Viewer.prototype.initializeAnnotations = function () {
    context
        .initialize()
        .register('viewer', this)
        .register('annotations', annotations)
        .register('controls', controls)
        .register('overlay', overlay)
        .register('state', state)
        .register('draw', draw)
        .get('viewer', function (viewer) {
            viewer.annotations = viewer.annotations || this.get('annotations');
            viewer.addHandler('open', viewer.annotations.initialize.bind(viewer.annotations));
        });
    return this;
};

@@ -42,24 +42,26 @@
 ;%0Aimport
+ %7B
  context
  from '.
@@ -56,35 +56,31 @@
 text
+ %7D
  from '
-./context/context
+holy-grail
 ';%0A
+%0A
 impo
@@ -627,60 +627,51 @@
 raw)
+;%0A
 %0A    
-    .get('viewer', function (viewer) %7B%0A        
+var viewer = context.get('viewer');%0A
     
@@ -713,20 +713,23 @@
 ions %7C%7C 
-this
+context
 .get('an
@@ -741,24 +741,16 @@
 ions');%0A
-        
     view
@@ -832,36 +832,7 @@
 ));%0A
-        %7D);%0A    return this;%0A
 %7D;%0A

Use context from grail