File tree Expand file tree Collapse file tree 3 files changed +68
-0
lines changed
Expand file tree Collapse file tree 3 files changed +68
-0
lines changed Original file line number Diff line number Diff line change 1+ tests
Original file line number Diff line number Diff line change 1+ module . exports = {
2+
3+ loadPlugin : function ( ) {
4+
5+ module . exports = Object . assign ( module . exports , {
6+
7+ 'migrator:migration:hook:require' : function ( ) {
8+
9+ /**
10+ * Always delay requires, otherwise your plugin will cause trouble
11+ * with db-migrates performance and generates issues to your users.
12+ */
13+ require ( 'typescript' ) . register ( ) ;
14+
15+ /**
16+ * Return value of this hook can be both, pure value or a promise.
17+ */
18+ return {
19+ extensions : 'ts'
20+ } ;
21+ }
22+ } ) ;
23+
24+ delete module . exports . loadPlugin ;
25+ } ,
26+ name : 'typescript' ,
27+ hooks : [
28+ 'migrator:migration:hook:require'
29+ ]
30+ } ;
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " db-migrate-plugin-typescript" ,
3+ "version" : " 1.0.0" ,
4+ "description" : " A db-migrate plugin to enable Typescript style migrations." ,
5+ "main" : " index.js" ,
6+ "dependencies" : {
7+ "typescript" : " ^1.8.10"
8+ },
9+ "devDependencies" : {},
10+ "scripts" : {
11+ "test" : " echo \" Error: no test specified\" && exit 1"
12+ },
13+ "repository" : {
14+ "type" : " git" ,
15+ "url" : " git+https://github.com/db-migrate/plugin-typescript.git"
16+ },
17+ "keywords" : [
18+ " dbmigrate" ,
19+ " db-migrate" ,
20+ " db" ,
21+ " migrate" ,
22+ " migration" ,
23+ " migrator" ,
24+ " database" ,
25+ " sql" ,
26+ " nosql" ,
27+ " newsql" ,
28+ " typescript" ,
29+ " type-script"
30+ ],
31+ "author" :
" Rémy Jeancolas <[email protected] >" ,
32+ "license" : " MIT" ,
33+ "bugs" : {
34+ "url" : " https://github.com/db-migrate/plugin-typescript/issues"
35+ },
36+ "homepage" : " https://github.com/db-migrate/plugin-typescript#readme"
37+ }
You can’t perform that action at this time.
0 commit comments