JSPM

@truffle/config

1.2.23
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12261
  • Score
    100M100P100Q19526F
  • License MIT

Utility for interacting with truffle-config.js files

Package Exports

  • @truffle/config

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@truffle/config) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@truffle/config

Utility for interacting with truffle-config.js files

Usage

const TruffleConfig = require("@truffle/config");

Instantiate default TruffleConfig object

const newConfig = TruffleConfig.default();

Instantiate custom TruffleConfig object

const customConfig = new TruffleConfig("/truffleDirPath", "/currentWorkingDirPath", networkObj);

Config.detect()

// 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");