void main()

in tool/extract.dart [10:30]


void main(List<String> args) {
  // Validate our cwd.
  if (!File('pubspec.yaml').existsSync()) {
    print('This tool must be run from the project root.');
    exit(1);
  }

  // Remove any previously generated files.
  clean();

  // Traverse all markdown files in the repository.
  int extractCount = 0;
  Iterable<FileSystemEntity> files = Directory(siteSrcPath)
      .listSync(recursive: true)
      .where((FileSystemEntity entity) =>
          entity is File &&
          entity.path.endsWith('.md') &&
          !entity.path.contains('README.md'));
  files.forEach((FileSystemEntity file) => extractCount += _processFile(file));
  print('\n$extractCount code snippets extracted.');
}