parse method
Parse the pubspec.yaml
file
Implementation
Pubspec parse(String path) {
try {
final pubspecFile = File(path);
final pubspecContent = pubspecFile.readAsStringSync();
return Pubspec.parse(pubspecContent);
} on Exception catch (_) {
throw PubspecParseException();
}
}