json-schema-to-typescript icon indicating copy to clipboard operation
json-schema-to-typescript copied to clipboard

cli: support --bannerComment as file input

Open Hotell opened this issue 6 years ago • 1 comments

Currently there is no way how to pass to CLI file with banner ( banners tends to be longer than one line comment )

Current solution:

json2ts -i events.json -o src/Events.ts --bannerComment "$(cat ./banner.txt)"

Proposed feature:

# Will use inline string for banner
json2ts -i events.json -o src/Events.ts --bannerComment '//Hello darnkess my old friend'

# Will use content of file
json2ts -i events.json -o src/Events.ts --bannerComment ./banner.txt

If you're ok with that I can send PR.

Hotell avatar Sep 04 '19 14:09 Hotell

Sounds great to me!

bcherny avatar Nov 29 '20 22:11 bcherny