UNPKG

tlpp-dev-cli

Version:

CLI para agilizar o processo de criação de projetos em TLPP e ADVPR

14 lines (13 loc) 508 B
import fs from 'node:fs/promises'; import path from 'node:path'; import { getGroupTemplate } from '../templates/tests/group.js'; export async function generateGroup(currentPath, nome) { const templateSuite = getGroupTemplate(nome); try { await fs.mkdir(path.join(currentPath, 'Testes', 'Group'), { recursive: true }); await fs.writeFile(path.join(currentPath, 'Testes', 'Group', `${nome}TestGroup.prw`), templateSuite); } catch (error) { console.error(error); } }