@mainframe/config
v0.3.0
Published
Shared local configuration for Mainframe packages.
Keywords
Readme
Mainframe config
Shared local configuration for Mainframe packages.
Installation
yarn add @mainframe/configUsage
The Environment class provides a namespaced persisted configuration and paths to be used.
All other functions need to be provided with an Environment instance they use to interact.
import { Environment, getDaemonSocketPath } from '@mainframe/config'
const env = new Environment('development')
const socketPath = getDaemonSocketPath(env)API
new Environment()
Arguments
name: string: name of the environment
Environment instance
.name
Returns string the environment name
.config
Returns Conf instance
.paths
Returns env paths shared by the platform
getDaemonBinPath()
Arguments
env: Environment
Returns string the path to the daemon binary
setDaemonBinPath()
Arguments
env: Environmentpath: string: the path to the daemon binary
getDaemonSocketPath()
Arguments
env: Environment
Returns string the socket path
setDaemonSocketPath()
Arguments
env: Environmentpath: string: the socket path
License
MIT
