How to use the conf.root function in conf

To help you get started, we’ve selected a few conf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kjirou / escape-from-the-maze / test / support / helpers.es6 View on Github external
export function heading(filePath) {
  let relativePath = path.relative(conf.root, filePath);
  relativePath = relativePath.replace(/^test\//, '');
  relativePath = relativePath.replace(/\.es6$/, '');
  return relativePath;
}
github misterfresh / react-drive-cms / src / app.js View on Github external
import React from 'react'
import { render } from 'react'

import { createBrowserHistory } from 'history'
import { StyleSheet } from 'aphrodite'

import routerMiddleware from 'route/middleware'

import Root from 'main/containers/root'
import configureStore from 'main/store/configureStore'

let initialState = {}
import conf from 'conf'
let history = createBrowserHistory(conf.root ? { basename: conf.root } : {})

const store = configureStore(initialState, routerMiddleware(history))

render(
    ,
    document.getElementById('app-mount'),
    document.getElementById('app-mount').firstElementChild
)