Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4de75cf

Browse files
committed
2 parents d5f2c09 + 0b02028 commit 4de75cf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Plugin-Typescript
22
A TypeScript plugin for db-migrate.
33

4+
## Usage
5+
46
Usage is very simple. Simply install this plugin via `npm install db-migrate-plugin-typescript`
57
or if using yarn: `yarn add db-migrate-plugin-typescript`
68

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

1012
Do however note that this has no effect on generating new migrations.
1113
Using `db-migrate create FooMigrations.ts` will not create a TypeScript migration file.
14+
15+
## Immplementation Detail
16+
17+
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 commit comments

Comments
 (0)