0.2.0 • Published 4 years ago

createx-template v0.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

createx

styled with prettier Dev Dependencies Donate

This library has the intention to help to generate code based on templates.

Installation

npm install createx

Usage

// 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()

Attention

This is an experimental library. Not yet ready for production.