alwaysai
Version:
The alwaysAI command-line interface (CLI)
15 lines (13 loc) • 459 B
text/typescript
import { TARGET_JSON_FILE_NAME } from '../../../paths';
import { Spinner } from '../../../util';
import { TargetConfig, TargetJsonFile } from '../../../core/app';
export async function writeTargetJsonFileComponent(targetConfig: TargetConfig) {
const message = `Write ${TARGET_JSON_FILE_NAME}`;
try {
TargetJsonFile().write(targetConfig);
Spinner(message).succeed();
} catch (exception) {
Spinner(message).fail();
throw exception;
}
}