Config.fromFile constructor
Creates a Config instance directly from the pubspec.yaml
file.
Provides a convenient way to load configuration without manual JSON parsing.
Implementation
factory Config.fromFile(File pubspecFile, CliConfig cliConfig) {
final json = readPubspec(pubspecFile);
return Config.fromJson(
json,
cliConfig: cliConfig,
pubspecFile: pubspecFile,
);
}