Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

feat: accept cli args via json and package.json #811

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

davidmurdoch
Copy link
Member

This enables doing ganache --config my-config.json where my-config.json is

{
  "wallet.totalAccounts": 5
}

This also enables setting the same config object in the project's package.json under the "ganache" field. e.g.,

{
  // ... rest of package.json
  "ganache": {
    "wallet.totalAccounts": 5
  }
}

We probably want to kick this one down the road, as the preferred way of specifying options is to set "wallet": {"totalAccounts": 5}}. We disabled yargs' dot-notation feature because of the way yargs parses dot-notation arguments didn't work well for us (I can't remember exactly what the problem was right now); and now the side effect is that it doesn't parse these config files the way we want.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Stalled
Development

Successfully merging this pull request may close these issues.

1 participant