How to use the @truffle/config.load function in @truffle/config

To help you get started, we’ve selected a few @truffle/config examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github trufflesuite / truffle / packages / solidity-loader / lib / genBuildOptions.js View on Github external
const genBuildOptions = buildOpts => {
  if (!buildOpts.network) {
    throw new Error(
      "You must specify the network name to deploy to. (network)"
    );
  }

  const truffleConfig = getTruffleConfig();

  if (!truffleConfig) {
    throw new Error("No Truffle Config file found!");
  }

  const config = TruffleConfig.load(truffleConfig, buildOpts);
  config.reset = true; // TODO make this configurable
  config.logger = Logger; // NOTE: this will be used within truffle
  return config;
};

@truffle/config

Utility for interacting with truffle-config.js files

MIT
Latest version published 9 months ago

Package Health Score

55 / 100
Full package analysis