hunk.code_window: - rebuilds the app in production mode at the current `HEAD`
   - creates a local `gh-pages` branch if one doesn't exist
   - moves your app to the `gh-pages` branch and creates a commit
   - edit the base tag in index.html to support github pages
   - pushes the `gh-pages` branch to github
   - returns back to the original `HEAD`
  
hunk.labels: keep keep keep replace replace keep keep
hunk.after_edit: - edit the base tag in index.html to support GitHub Pages
   - pushes the `gh-pages` branch to GitHub
  
hunk.file_path: README.md
hunk.type: replace
file: 'use strict';
  
  var UnknownCommand = require('../commands/unknown');
  
  module.exports = function(commands, commandName, commandArgs, optionHash) {
    var options = optionHash || {};
    var project = options.project;
    var ui      = options.ui;
  
    function aliasMatches(alias) {
      return alias === commandName;
    }
  
    function findCommand(commands, commandName) {
      for (var key in commands) {
        var command = commands[key];
  
        var name = command.prototype.name;
        var aliases = command.prototype.aliases || [];
  
        if (name === commandName || aliases.some(aliasMatches)) {
          return command;
        }
      }
    }
  
    // Attempt to find command in ember-cli core commands
    var command = findCommand(commands, commandName);
  
    var addonCommand;
    // Attempt to find command within addons
    if (project && project.eachAddonCommand) {
      project.eachAddonCommand(function(addonName, commands) {
        addonCommand = findCommand(commands, commandName);
        return !addonCommand;
      });
    }
  
    if (command && addonCommand) {
      if (addonCommand.overrideCore) {
        ui.writeWarnLine('An ember-addon has attempted to override the core command "' +
                command.prototype.name + '". The addon command will be used as the overridding was explicit.');
  
        return addonCommand;
      }
  
      ui.writeWarnLine('An ember-addon has attempted to override the core command "' +
                              command.prototype.name + '". The core command will be used.');
      return command;
    }
  
    if (command) {
      return command;
    }
  
    if (addonCommand) {
      return addonCommand;
    }
  
    // if we didn't find anything, return an "UnknownCommand"
    return UnknownCommand.extend({
      name: commandName
    });
  };
  