Skip to content

Commit 1fc38a2

Browse files
authored
feat: use external hooks repo to not duplicate code (#13)
1 parent cca9daf commit 1fc38a2

File tree

4 files changed

+73
-20
lines changed

4 files changed

+73
-20
lines changed

.tp-config.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,20 @@
44
"server": {
55
"description": "The server you want to use in the code.",
66
"required": true
7+
},
8+
"asyncapiFileDir": {
9+
"description": "Custom location of the AsyncAPI file that you provided as an input in generation. By default it is located in the root of the output directory"
710
}
811
},
912
"nonRenderableFiles": [
1013
"src/api/middlewares/*.*",
1114
"src/lib/config.js"
1215
],
13-
"generator": ">=0.41.0 <2.0.0",
16+
"generator": ">=0.46.0 <2.0.0",
1417
"filters": [
1518
"@asyncapi/generator-filters"
16-
]
19+
],
20+
"hooks": {
21+
"@asyncapi/generator-hooks": "createAsyncapiFile"
22+
}
1723
}

hooks/create-asyncapi-file.js

-18
This file was deleted.

package-lock.json

+64
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
},
2929
"dependencies": {
3030
"@asyncapi/generator-filters": "^1.0.0",
31+
"@asyncapi/generator-hooks": "^0.1.0",
3132
"filenamify": "^4.1.0",
3233
"lodash": "^4.17.15"
3334
},

0 commit comments

Comments
 (0)