index.js 248 Bytes
Newer Older
Z's avatar
Z committed
1 2 3 4 5 6 7 8 9 10
import d2Mock from './d2-mock'

const req = context => context.keys().map(context)
const options = req(require.context('./api/', true, /\.js$/))
  .filter(e => e.default)
  .map(e => e.default)

options.forEach(option => {
  d2Mock.load(option)
})