UNPKG

@bemedev/cli-test

Version:

A library for testing CLI libraries (INCEPTION !!)

18 lines (15 loc) 515 B
import { writeFile, unlink } from 'fs/promises'; import { SETUP } from '../constants.js'; import { exists } from '../helpers/exist.js'; import { getSetupFile } from '../helpers/getSetupFile.js'; const writeConfig = () => { const path = getSetupFile(); return writeFile(path, SETUP, { encoding: 'utf-8' }); }; const removeConfig = async () => { const { check, path } = exists(); if (check) return unlink(path); }; export { removeConfig, writeConfig }; //# sourceMappingURL=cli.utils.js.map