var parseOptions = require('./options');
var prepareTemplates = require('./template').prepareTemplates;
var utils = require('./utils');

/**
 * Build a data/context object for use by the builder
 * @TODO This may move into its own module if it seems appropriate
 * @TODO Make this testable
 *
 * @param {Object} options
 * @return {Promise} resolving to {Object} of keyed file data
 */
function prepareData (options) {
  var parseFiles = utils.readFilesKeyed;
  // Data data
  const dataData = parseFiles(options.data, {
    contentFn: options.data.parseFn
  });
  // Layouts data
  const layoutData = parseFiles(options.layouts);

  // Build data object
  return Promise.all([dataData, layoutData])
    .then(allData => {
      return { data: allData[0],
               layouts: allData[1]
             };
    });
}
/**
 * Build the drizzle output
 *
 * @return {Promise}; resolves to [dataObj, Handlebars] for now
 */
function drizzle (options) {
  const opts = parseOptions(options);
  return Promise.all([prepareData(opts), prepareTemplates(opts)]);
}

export default drizzle;

@@ -1,15 +1,18 @@
-var
+import
  parseOption
@@ -13,26 +13,21 @@
 Options 
-= require(
+from 
 './optio
@@ -33,14 +33,18 @@
 ons'
-)
 ;%0A
-var
+import %7B
  pre
@@ -57,26 +57,23 @@
 mplates 
-= require(
+%7D from 
 './templ
@@ -80,48 +80,33 @@
 ate'
-).prepareTemplates;%0Avar utils = require(
+;%0Aimport * as utils from 
 './u
@@ -110,17 +110,16 @@
 ./utils'
-)
 ;%0A%0A/**%0A 
@@ -608,16 +608,103 @@
 outs);%0A%0A
+  // Page data%0A  // parseFiles (options.pages) with a content fn of%0A  // front matter%0A%0A
   // Bui

Convert to ES6 imports