anchor.diff:    '.js',
   ];
   
  -typedef VerificationFunction = void Function(String);
  -
  -void verifyResourcesGDartGenerated({
  -  VerificationFunction failVerification = failGenerate,
  -}) {
  -  print('Verifying that ${path.basename(resourcesFile.path)} is up-to-date...');
  -
  -  // Find the hashes for the last generated version of resources.g.dart.
  -  Map<String, String> resourceHashes = {};
  -  // highlight_css md5 is 'fb012626bafd286510d32da815dae448'
  -  RegExp hashPattern = RegExp(r"// (\S+) md5 is '(\S+)'");
  -  for (RegExpMatch match
  -      in hashPattern.allMatches(resourcesFile.readAsStringSync())) {
  -    resourceHashes[match.group(1)] = match.group(2);
  -  }
  -
  -  // For all resources (modulo compiled JS ones), verify the hash.
  -  for (FileSystemEntity entity in resourceDir.listSync()) {
  -    String name = path.basename(entity.path);
  -    if (!resourceTypes.contains(path.extension(name))) {
  -      continue;
  -    }
  -
  -    if (name == 'migration.js') {
  -      // skip the compiled js
  -      continue;
  -    }
  -
  -    String key = name.replaceAll('.', '_');
  -    if (!resourceHashes.containsKey(key)) {
  -      failVerification('No entry on resources.g.dart for $name');
  -    } else {
  -      String hash = md5String((entity as File).readAsStringSync());
  -      if (hash != resourceHashes[key]) {
  -        failVerification('$name not up to date in resources.g.dart');
  -      }
  -    }
  -  }
  -
  -  // verify the compiled dart code
  -  StringBuffer sourceCode = StringBuffer();
  -  for (FileSystemEntity entity in dartSources.parent.listSync()) {
  -    if (entity.path.endsWith('.dart')) {
  -      sourceCode.write((entity as File).readAsStringSync());
  -    }
  -  }
  -  String hash = md5String(sourceCode.toString());
  -  if (hash != resourceHashes['migration_dart']) {
  -    failVerification('Compiled javascript not up to date in resources.g.dart');
  -  }
  -
  -  print('Generated resources up to date.');
  +String base64Encode(List<int> bytes) {
  +  String encoded = base64.encode(bytes);
  +
  +  // Logic to cut lines into 80-character chunks.
  +  var lines = <String>[];
  +  var index = 0;
  +
  +  while (index < encoded.length) {
  +    var line = encoded.substring(index, math.min(index + 80, encoded.length));
  +    lines.add(line);
  +    index += line.length;
  +  }
  +
  +  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,
  +    dartSources.path,
  +  ]);
  +  process.stdout.listen((List<int> data) => stdout.add(data));
  +  process.stderr.listen((List<int> data) => stderr.add(data));
  +  int exitCode = await process.exitCode;
  +
  +  if (exitCode != 0) {
  +    fail('Failed compiling ${dartSources.path}.');
  +  }
   }
   
   void createResourcesGDart() {
  
positive.code: 
    // write the content
    resourcesFile.writeAsStringSync(content);
  }
  
  String generateResourceFile(Iterable<File> resources) {
  
negative.code:   }
  }
  
  final File dartSources = File(path.join('pkg', 'analysis_server', 'lib', 'src',
      'edit', 'nnbd_migration', 'web', 'migration.dart'));
  final javascriptOutput = File(path.join('pkg', 'analysis_server', 'lib', 'src',
      'edit', 'nnbd_migration', 'resources', 'migration.js'));
  
  final Directory resourceDir = Directory(path.join('pkg', 'analysis_server',
      'lib', 'src', 'edit', 'nnbd_migration', 'resources'));
  final File resourcesFile = File(path.join('pkg', 'analysis_server', 'lib',
      'src', 'edit', 'nnbd_migration', 'resources', 'resources.g.dart'));
  
  final List<String> resourceTypes = [
    '.css',
  