zenith-gen
Version:
A CLI tool designed to streamline the creation of projects within the Zenith Inova ecosystem, providing optimized configurations and modern development tools.
16 lines (14 loc) • 437 B
text/typescript
import fs from 'fs-extra';
import path from 'path';
export function configureEnv(projectPath: string, useChromatic: boolean) {
fs.writeFileSync(
path.join(projectPath, '.env'),
`ENV=development
${useChromatic && 'CHROMATIC_PROJECT_TOKEN='}`,
);
fs.writeFileSync(
path.join(projectPath, '.env.example'),
`ENV=development
${useChromatic && 'CHROMATIC_PROJECT_TOKEN='}`,
);
}