Config in Typescript with multiple files as source
See original GitHub issueHello,
Is there any way to generate the config.js
file using a config.ts
file as source where other files could be imported to allow better configuration organization (the .js file can become quite big) and to allow having it using the model type IConfig
?
I’m not sure if there is a clean way to do this now nor how to implement the changes that would be needed in order to have that.
Cheers in advance!
Issue Analytics
- State:
- Created 3 years ago
- Comments:22 (22 by maintainers)
Top Results From Across the Web
How can I pass multiple source files to the TypeScript compiler?
Compile a project given a valid configuration file. The argument can be a file path to a valid JSON configuration file, or a...
Read more >TSConfig Reference - Docs on every TSConfig option
A TSConfig file in a directory indicates that the directory is the root of a TypeScript or JavaScript project... Compiler Options. Top Level....
Read more >Can I configure TypeScript to compile multiple files into a ...
The easiest way is to make an index.ts and re-export everything you want to be importable by your users: export { Foo }...
Read more >Compile TypeScript Project - TutorialsTeacher
As you know, TypeScript files can be compiled using the tsc <file name>.ts command. It will be tedious to compile multiple .ts files...
Read more >Compiling Actions from multiple source files - Auth0 Community
I'm trying to implement my Actions in Typescript. In order to maximize both clarity and testability, I would like to be able to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just a final note:
to use multiple ts files, you will need to use a tool such as webpack, to combine all your sources into one — but because your config is it’s own separate project, you can use any tooling you choose.
Anyone who writes a TS config file will use the typescript compiler to turn it into a JS file. Then they will deploy the normal way.
The benefit of the change is that they can rely on the interfaces of restool from their own project, where they generate their config file.
Here’s the flow expressed as shell commands.