exec method
Run command.
The contents of katana.yaml and the arguments of the command are passed to context.
コマンドを実行します。
contextにkatana.yamlの内容やコマンドの引数が渡されます。
Implementation
@override
Future<void> exec(ExecContext context) async {
final bin = context.yaml.getAsMap("bin");
final katanaAsset = bin.get("katanaasset", "katanaasset");
final storeYamlFile = File("${Directory.current.path}/store.yaml");
if (storeYamlFile.existsSync()) {
await const StoreYamlCliCode().generateFile("store.yaml");
}
await command(
"Create assets for the store.",
[
katanaAsset,
],
);
}