Utility for interacting with truffle-config.js files
$ npm install @truffle/config
Utility for interacting with truffle-config.js files
const TruffleConfig = require("@truffle/config");
const newConfig = TruffleConfig.default();
const customConfig = new TruffleConfig("/truffleDirPath", "/currentWorkingDirPath", networkObj);
// find config file & return new TruffleConfig object with config file settings (cwd)
const truffleConfig = TruffleConfig.detect();
// find config file & return new TruffleConfig object from custom working dir
const truffleConfig = TruffleConfig.detect({ workingDirectory: "./some/Path" });
// find & return new TruffleConfig object from custom named config
const customTruffleConfig = TruffleConfig.detect({}, "./customConfig.js");
© 2010 - cnpmjs.org x YWFE | Home | YWFE