/*!
 * expand-front-matter <https://github.com/jonschlinkert/expand-front-matter>
 *
 * Copyright (c) 2015, Jon Schlinkert.
 * Licensed under the MIT License.
 */

'use strict';

var merge = require('mixin-deep');
var expand = require('expand');

module.exports = function (app, locals) {
  return function (view, next) {
    if (!view.data || view.data.process === false) {
      return next();
    }
    var data = merge({}, app.cache.data, locals);
    view.data = expand(view.data, data);
    next();
  };
};

@@ -176,21 +176,21 @@
 ';%0A%0Avar 
-merge
+utils
  = requi
@@ -197,129 +197,455 @@
 re('
-mixin-deep');%0Avar expand = require('expand');%0A%0Amodule.exports = function (app, locals) %7B%0A  return function (view, next) %7B
+./utils');%0A%0Amodule.exports = function (app, locals) %7B%0A  var opts = (app && app.options) %7C%7C %7B%7D;%0A  var cache = (app && app.cache) %7C%7C %7B%7D;%0A  var expand = utils.expand(opts);%0A  var data = utils.merge(%7B%7D, cache.data, locals);%0A%0A  return function fn(view, next) %7B%0A    if (!view.isView) %7B%0A      utils.merge(data, view.cache.data);%0A      return fn;%0A    %7D%0A%0A    if (typeof next !== 'function') %7B%0A      next = function () %7B%0A        return view;%0A      %7D;%0A    %7D%0A
 %0A   
@@ -725,57 +725,8 @@
   %7D%0A
-    var data = merge(%7B%7D, app.cache.data, locals);
 %0A   
@@ -763,24 +763,31 @@
  data);%0A    
+return 
 next();%0A  %7D;

update to work with latest assemble