run method
Runs this command.
The return value is wrapped in a Future
if necessary and returned by
CommandRunner.runCommand.
Implementation
@override
void run() async {
final removeLock = argResults?['remove-lock'] ?? false;
final argMorphemeYaml = argResults.getOptionMorphemeYaml();
YamlHelper.validateMorphemeYaml(argMorphemeYaml);
final localizationHelper = LocalizationHelper(argMorphemeYaml);
if (exists(join(current, localizationHelper.outputDir))) {
deleteDir(join(current, localizationHelper.outputDir));
}
if (removeLock && exists(join(current, 'ios', 'Podfile.lock'))) {
delete(join(current, 'ios', 'Podfile.lock'));
}
final yaml = YamlHelper.loadFileYaml(argMorphemeYaml);
await ModularHelper.clean(
concurrent: yaml.concurrent,
removeLock: removeLock,
);
StatusHelper.success('morpheme clean');
}