define(['require', 'app', 'backbone.marionette', 'backbone', 'marked', 'underscore'],
  function (require, App, Marionette, Backbone, marked, _) {
    'use strict';

    var controller = {
      showHelp: function () {
        require(['./views/HelpView'],
          function (HelpView) {
            $.getJSON('/scripts/help/keyboardShortcuts.json', function (data) {
              _.each(data, function (category) {
                _.each(category.shortcuts, function (shortcut) {
                  shortcut.description = marked(shortcut.description);
                })
              });

              var helpModel = new Backbone.Model({keyboardShortcuts: data});
              App.mainRegion.show(new HelpView({model: helpModel}));
            });
          });
      }
    };

    App.addInitializer(function () {
      new Marionette.AppRouter({
        controller: controller,
        appRoutes: {
          'help': 'showHelp'
        }
      });
    });
  });

define(['require', 'app', 'backbone.marionette', 'backbone', 'marked',
    'underscore', 'json!./keyboardShortcuts.json'],
  function (require, App, Marionette, Backbone, marked, _, keyboardShortcuts) {
    'use strict';

    var controller = {
      showHelp: function () {
        require(['./views/HelpView'],
          function (HelpView) {
            _.each(keyboardShortcuts, function (category) {
              _.each(category.shortcuts, function (shortcut) {
                shortcut.description = marked(shortcut.description);
              });
            });

            var helpModel = new Backbone.Model({keyboardShortcuts: keyboardShortcuts});
            App.mainRegion.show(new HelpView({model: helpModel}));
          });
      }
    };

    App.addInitializer(function () {
      new Marionette.AppRouter({
        controller: controller,
        appRoutes: {
          'help': 'showHelp'
        }
      });
    });
  });

Load keyboard shortcuts json using json requirejs plugin so that it can be compiled into build
Load keyboard shortcuts json using json requirejs plugin so that it can be compiled into build
