async function main(args) {
  try {
    const genDepsWithTests = args.indexOf('--with_tests') != -1;
    const {text, errors} = await closureMakeDeps.execute([
      '--root',
      CLOSURE_PATH,
      '--root',
      THIRD_PARTY_PATH,
      ...genDepsWithTests ? [] : TEST_EXCLUSION_FLAGS,
      '--exclude',
      `${CLOSURE_PATH}/deps*.js`,
      '--exclude',
      `${CLOSURE_PATH}/transpile.js`,
    ]);
    // Print all encountered errors. Errors are not necessarily fatal.
    for (const error of errors) {
      console.error(error.toString());
    }
    if (text) {
      console.log(`${HEADER}\n\n${text.trim()}`);
      return 0;
    } else {
      // No text indicates that the errors were fatal.
      return 1;
    }
  } catch (e) {
    console.error(e);
    return 1;
  }
}
/*.js',
  '--exclude',
  `${CLOSURE_PATH}/demos/`,
];

/**
Prints the generated deps.js contents.
@param {!Array<string>} args Command-line arguments.
@return {!Promise<number>} The exit code.