Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
wzrdtales committed Oct 5, 2017
2 parents d5f2c09 + 0b02028 commit 4de75cf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Plugin-Typescript
A TypeScript plugin for db-migrate.

## Usage

Usage is very simple. Simply install this plugin via `npm install db-migrate-plugin-typescript`
or if using yarn: `yarn add db-migrate-plugin-typescript`

Expand All @@ -9,3 +11,7 @@ using your regular `tsconfig.json`

Do however note that this has no effect on generating new migrations.
Using `db-migrate create FooMigrations.ts` will not create a TypeScript migration file.

## Immplementation Detail

The plugin hooks into the functionality of `db-migrate` itself. In this case it hooks into `migrator:migration:hook:require`, which in this case requires another transpiler (TypeScript) and registers also a new file extension (.ts). Make sure to name your migrations accordingly (ending with .ts).

0 comments on commit 4de75cf

Please sign in to comment.