bcherny/json-schema-to-typescript

cli: support --bannerComment as file input

Open

#255 opened on Sep 4, 2019

View on GitHub
 (1 comment) (1 reaction) (0 assignees)TypeScript (449 forks)github user discovery
enhancementgood first issuehelp wanted

Repository metrics

Stars
 (3,302 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

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.

Contributor guide