@tractor/config-loader
A configuration loader utility for tractor.
![npm version](https://img.shields.io/npm/v/@tractor/config-loader.svg)
API
loadConfig (cwd: string, configPath?: string): TractorConfig
Load a tractor configuration file from a given directory and path (defaults to ./tractor.conf.js), before falling back to the default configuration.
import { loadConfig } from '@tractor/config-loader';
const config = loadConfig(process.cwd(), './path/to/tractor.conf.js');
getConfig (): TractorConfig
Retrieves the current config for the running Tractor instance. loadConfig()
must be called befere calling getConfig()
.
import { getConfig } from '@tractor/config-loader';
const config = getConfig();