This library has the intention to help to generate code based on templates.
npm install createx-generator
// import
import { File, region } from 'createx';
// use
new File('./models/person.ts')
.render(`
export class Person {
${region('generated',`
name: string;
phone: string;`)}
}
`).overwrite(false).overwriteRegions(true).save()