import home from 'user-home' ; import merge from 'lodash.merge' ; import { localStaticConfig , staticConfig } from './staticConfig' ; import { IDynamicConfig , IConfig } from './interface' ; export default ( customConfig ) : IConfig => { const config = merge ( { } , localStaticConfig , staticConfig , customConfig ) ; const rootPath = `${ home }/.${ config . rootName }` ; const dynamicConfig = { virtualPath : { entry : rootPath , configPath : `${ rootPath }/config.json` , templatePath : `${ rootPath }/templates` , nodeModulesPath : `${ rootPath }/${ config . rootName }_modules` , } , } ; return { ... config , ... dynamicConfig , } ; } ;