j-d-carmichael / boats

Beautiful Open Api Template System
MIT License
57 stars 8 forks source link

feat: Allow loading of external helpers in TypeScript. #62

Closed zewish closed 3 years ago

zewish commented 3 years ago

Allows loading proper TypeScript helper files instead of the usual JavaScript ones. Also added a bit more unit tests to test one of the Template.ts functions.

Example usage:

$ boats -f ./nunjucksHelpers/myTypeScriptHelper.ts -i ./src/index.yml -o ./build/api.yml

Uses ts-node which should be installed as a peer dependency in this case.