Check if the pubspec.yaml file exists
bool pubspecExists(Directory projectDir) => File('${projectDir.path}/pubspec.yaml').existsSync();