hunk.code_window: import {provide} from '@angular/core';
   import {APP_BASE_HREF} from '@angular/common';
   import {<%= jsComponentName %>AppComponent} from './app/';
   import {
     REQUEST_URL,
     ORIGIN_URL
  
hunk.labels: replace replace replace keep keep keep
hunk.after_edit: import { provide } from '@angular/core';
   import { APP_BASE_HREF } from '@angular/common';
   import { APP_SHELL_BUILD_PROVIDERS } from '@angular/app-shell';
   import { <%= jsComponentName %>AppComponent } from './app/';
  
hunk.file_path: addon/ng2/blueprints/mobile/files/__path__/main-app-shell.ts
hunk.type: replace
file: var path = require('path');
  var EOL = require('os').EOL;
  
  module.exports = addBarrelRegistration;
  
  function addBarrelRegistration(blueprint, installationDir, fileName) {
    var parts = installationDir.split(path.sep);
    
    var idx = parts.lastIndexOf('shared');
    if (idx < parts.length -2) {
      return Promise.resolve();
    }
    
    var sharedDir = parts.slice(0, idx + 1).join(path.sep);
    var relativeParts = parts.splice(idx + 1);
    if (fileName) {
      relativeParts.push(fileName);
    }
    var importFrom = './' + relativeParts.join('/');
    
    return blueprint.insertIntoFile(
      sharedDir + path.sep + 'index.ts',
      `export * from '${importFrom}';${EOL}`
    );
  }
  