Skip to content
sam bacha edited this page Oct 8, 2021 · 2 revisions

MetaMask DeCloak

Welcome to the metamask-decloak wiki!

Building Development MetaMask

Rationalize build system arguments (#12047)

This rationalizes how arguments are passed to and parsed by the build system. To accomplish this, everything that isn't an environment variable from .metamaskrc or our CI environment is now passed as an argument on the command line.

Of such arguments, the entryTask is still expected as a positional argument in the first position (i.e. process.argv[2]), but everything else must be passed as a named argument. We use minimist to parse the arguments, and set defaults to preserve existing behavior.

Arguments are parsed in a new function, parseArgv, in development/build/index.js. They are assigned to environment variables where convenient, and otherwise returned from parseArgv to be passed to other functions invoked in the same file.

This change is motivated by our previous inconsistent handling of arguments to the build system, which will grow increasingly problematic as the build system grows in complexity. (Which it will very shortly, as we introduce Flask builds.)

Miscellaneous changes:

  • Adds a build system readme at development/build/README.md
  • Removes the beta package script. Now, we can instead call: yarn dist --build-type beta
  • Fixes the casing of some log messages and reorders some parameters in the build system
Clone this wiki locally