INNER CODE UNIT · TypeScript
ensureTsConfig
StellateHQ/fuse · packages/create-fuse-app/src/index.ts:25
const ensureTsConfig = async (targetDir: string): Promise<boolean> => {
if (!existsSync(resolve(targetDir, 'tsconfig.json'))) {
await fs.writeFile(resolve(targetDir, 'tsconfig.json'), defaultTsConfig)
return false
}
return true
}
async function createFuseApp() {
const packageManager = getPkgManager()
prompts.intro(kl.trueColor(219, 254, 1)('Fuse - Your new API'))
// TODO: we can prompt for the name of the dir in the future
// when we make this work standalone
const targetDir = resolve(process.cwd())