toJson method
Implementation
Map<String, Object> toJson() {
return {
'name': name,
'path': path,
if (repository != null) 'repository': repository!,
'packages': packages.map((p) => p.toString()).toList(),
if (ignore.isNotEmpty) 'ignore': ignore.map((p) => p.toString()).toList(),
if (scripts.isNotEmpty) 'scripts': scripts.toJson(),
'ide': ide.toJson(),
'command': commands.toJson(),
};
}