'use strict';

var rump = module.exports = require('rump');
var configs = require('./configs');
var originalAddGulpTasks = rump.addGulpTasks;

// TODO remove on next major core update
rump.addGulpTasks = function(options) {
  originalAddGulpTasks(options);
  require('./gulp');
  return rump;
};

rump.on('update:main', function() {
  configs.rebuild();
  rump.emit('update:scripts');
});

Object.defineProperty(rump.configs, 'uglifyjs', {
  get: function() {
    return configs.uglifyjs;
  }
});

Object.defineProperty(rump.configs, 'webpack', {
  get: function() {
    return configs.webpack;
  }
});

@@ -16,45 +16,171 @@
 var 
-rump = module.exports = require('rump
+fs = require('fs');%0Avar path = require('path');%0Avar rump = module.exports = require('rump');%0Avar ModuleFilenameHelpers = require('webpack/lib/ModuleFilenameHelpers
 ');%0A
@@ -260,16 +260,86 @@
 lpTasks;
+%0Avar protocol = process.platform === 'win32' ? 'file:///' : 'file://';
 %0A%0A// TOD
@@ -574,21 +574,419 @@
 ipts');%0A
-
 %7D);%0A%0A
+// Rewrite source map URL for consistency%0AModuleFilenameHelpers.createFilename = function(module) %7B%0A  var url;%0A  if(typeof module === 'string') %7B%0A    url = module.split('!').pop();%0A  %7D%0A  else %7B%0A    url = module.resourcePath %7C%7C module.identifier().split('!').pop();%0A  %7D%0A  if(fs.existsSync(url)) %7B%0A    url = protocol + url.split(path.sep).join('/');%0A  %7D%0A  else %7B%0A    return '';%0A  %7D%0A  return url;%0A%7D;%0A%0A
 Object.d

Rewrite source map URLs for consistency