src/lib/index.js
function singleEntrySourceMap(entryItem, entryData, sourceMap, callback) { // eslint-disable-line
  if (typeof entryItem !== 'string') { return callback(null, sourceMap); }

  // get input sources for this entry
  getInputSources(entryItem, (inputSourceError, inputSourceMap) => { // eslint-disable-line
    if (inputSourceError) { return callback(inputSourceError, null); }

    // get source data
    const sourceData = deepAssign({}, sourceMap, inputSourceMap);

    // get next entry item
    const nextEntryItem = entryData[entryData.indexOf(entryItem) + 1];

    // recursively go through tree
    singleEntrySourceMap(nextEntryItem, entryData, sourceData, callback);
  });
}
function singleEntrySourceMap(entryItem, entryData, sourceMap, callback) { // eslint-disable-line
  if (typeof entryItem !== 'string') { return callback(null, sourceMap); }

  // get input sources for this entry
  getInputSources(entryItem, (inputSourceError, inputSourceMap) => { // eslint-disable-line
    if (inputSourceError) { return callback(inputSourceError, null); }

    // get source data
    const sourceData = deepAssign({}, sourceMap, inputSourceMap);

    // get next entry item
    const nextEntryItem = entryData[entryData.indexOf(entryItem) + 1];

    // recursively go through tree
    singleEntrySourceMap(nextEntryItem, entryData, sourceData, callback);
  });
}
function singleEntrySourceMap ( entryItem , entryData , sourceMap , callback ) { // eslint-disable-line if ( typeof entryItem !== 'string' ) { return callback ( null , sourceMap ) ; } // get input sources for this entry getInputSources ( entryItem , ( inputSourceError , inputSourceMap ) => { // eslint-disable-line if ( inputSourceError ) { return callback ( inputSourceError , null ) ; } // get source data const sourceData = deepAssign ( { } , sourceMap , inputSourceMap ) ; // get next entry item const nextEntryItem = entryData [ entryData . indexOf ( entryItem ) + 1 ] ; // recursively go through tree singleEntrySourceMap ( nextEntryItem , entryData , sourceData , callback ) ; } ) ; }
Get source map for a single config object entry path.

@method singleEntrySourceMap
@param {String} entryItem the entry item string, generally a file or dir path
@param {Array} entryData the entry data
@param {Object} sourceMap the source map
@callback {Function} callback the callback
Get source map for a single config object entry path .