JetBrains / web-types

JSON standard for documenting web component libraries for IDEs, documentation generators and other tools
Apache License 2.0
279 stars 25 forks source link

Using a configuration file with --config #20

Closed dancarasco closed 3 years ago

dancarasco commented 3 years ago

Not a bug - just need some help! - Attempting to change/add an array of directories to the 'components' array in WebTypesBuilderConfig, what is the recommended way to pass this into the --config option? Create a new ts file, Implement WebTypesBuilderConfig and all the properties, override them in the constructor and point --config to a new .ts file?

I tend to work mainly with .js and .json files in this project, we don't compile TS so trying to work out the best approach to this. So far I haven't been able to get the doc gen to pick up a --config file.

Thanks!

piotrtomiak commented 3 years ago

The config file is included with require so it should be either JSON or JS file. The ts typings are there to provide nice reference on the contents.

dancarasco commented 3 years ago

The config file is included with require so it should be either JSON or JS file. The ts typings are there to provide nice reference on the contents.

Perfect, thank you!