anchor.diff:  import 'dart:io';
   import 'dart:math' as math;
   
  +import 'package:args/args.dart';
   import 'package:crypto/crypto.dart';
   import 'package:path/path.dart' as path;
   
   void main(List<String> args) async {
  -  if (args.isEmpty) {
  -    // this is valid
  -  } else if (args.length != 1 || args.first != '--verify') {
  +  var argParser = ArgParser()
  +    ..addFlag('verify', negatable: false)
  +    ..addFlag('dev', negatable: false)
  +    ..addFlag('help', negatable: false);
  +  var argResults = argParser.parse(args);
  +  if (argResults['help'] == true) {
       fail('''
   usage: dart pkg/analysis_server/tool/nnbd_migration/generate_resources.dart [--verify]
   
  
positive.code:   return lines.join('\n');
  }
  
  void compileWebFrontEnd() async {
    String sdkBinDir = path.dirname(Platform.resolvedExecutable);
    String dart2jsPath = path.join(sdkBinDir, 'dart2js');
  
    const minified = true;
  
    // dart2js -m -o output source
    Process process = await Process.start(dart2jsPath, [
      if (minified) '-m',
      '--no-frequency-based-minification',
      '-o',
      javascriptOutput.path,
  
negative.code:     fail('Please run this tool from the root of the sdk repo.');
    }
  
    bool verify = argResults['verify'];
    bool dev = argResults['dev'];
  
    if (verify) {
      verifyResourcesGDartGenerated();
    } else {
      await compileWebFrontEnd(devMode: dev);
  
      print('');
  
  