regressify
Version:
Visual regression tests support
21 lines (20 loc) • 635 B
JavaScript
import fs from 'fs';
import path from 'path';
import chalk from 'chalk';
import slash from 'slash';
const markdown = `
# Precise Alloy - Regression Test
Please check [Documentation](https://tuyen.blog/optimizely-cms/testing/get-started/) for the instructions.
`;
export async function createMarkdownFile() {
try {
const markdownPath = slash(path.join(process.cwd(), 'README.md'));
if (!fs.existsSync(markdownPath)) {
fs.writeFileSync(markdownPath, markdown.trimStart());
}
}
catch (error) {
console.log(chalk.red(error));
}
}
//# sourceMappingURL=create-markdown-file.js.map