text: //config = require('config')()
  import stackTrace from 'stack-trace'
  import _ from 'lodash'
  import path from 'path'
  
  const getCallerFile = function(opts = {index: 2}) {
    //console.trace()
    //const f = _.find(stackTrace.get(), (v) => {
    //  return !v.getFileName().match('babel-core') && !v.getFileName().match('core-js')
    //})
    //console.log(f.getFileName())
  
    const frame = stackTrace.get()[opts.index]
    const file = path.relative(process.cwd(), frame.getFileName())
    const dir = path.dirname(file)
    const ext = path.extname(file)
    const base = path.basename(file, ext)
    const line = frame.getLineNumber()
    const functionName = frame.getFunctionName()
    const methodName = frame.getMethodName()
    const className = _.get(frame, 'receiver.name')
    const methodString = methodName != null ? ' (' + methodName + ')' : ''
    const parts = dir.split('/')
    let dirString = ''
    const ref = parts.slice(0, -1)
    for (let [i, part] of ref.entries()) {
      console.log([part, i])
      if (part === '..') continue
      dirString += part + '.'
    }
    return `${dirString}${base}#${line}${methodString}`
  }
  
  export default getCallerFile
  