loadTemplate function
Load template JSON from a relative path inside the CLI package
Implementation
Template loadTemplate(String relativePath) {
final file = _getPackageFile(relativePath);
final jsonStr = file.readAsStringSync();
final jsonData = jsonDecode(jsonStr) as Map<String, dynamic>;
return Template.fromJson(jsonData);
}