Skip to content

microsoft/ts-gyb

Repository files navigation

ts-gyb

GitHub Workflow Status npm

ts-gyb is a multi-purpose code generation tool based on TypeScript interfaces. It was initially designed for generating boilerplate interfacing code between web and mobile platforms in hybrid apps. With custom templates, it can generate code for any use from TypeScript.

GYB: Generate Your Boilerplate. Inspired by swift/gyb.py.

Features

  • Generate production ready and well documented code from TypeScript code
  • Support most of TypeScript syntax
  • Fully customizable template makes the generated code fit perfectly into any project

Installation

To use ts-gyb with an existing project managed by npm, it is recommended to install ts-gyb as a dev dependency:

npm install --save-dev ts-gyb

You can also install ts-gyb globally:

npm install --global ts-gyb

Get Started

1. Define TypeScript interfaces