Search Terms
typescript tsc copy files
Suggestion
The typescript compiler should have an option to copy non-compiled files, similarly to Babel: https://babeljs.io/docs/en/babel-cli#copy-files
Use Cases
Almost all use cases where typescript files are compiled into a different folder will require bringing along other non-typescript files.
For the frontend, usually there already is a build system in place so this is trivial.
In the backend however, there is rarely a need for a build system, and thus developers often go out of their way to set up a system where non-typescript files are watched for changes and copied.
Existing npm packages for this kind of functionality are all poorly maintained and unsafe. Currently my only option is either copying all files on any change or writing a custom script.
Examples
tsc -w --copy-files
Checklist
My suggestion meets these guidelines:
Search Terms
typescript tsc copy files
Suggestion
The typescript compiler should have an option to copy non-compiled files, similarly to Babel: https://babeljs.io/docs/en/babel-cli#copy-files
Use Cases
Almost all use cases where typescript files are compiled into a different folder will require bringing along other non-typescript files.
For the frontend, usually there already is a build system in place so this is trivial.
In the backend however, there is rarely a need for a build system, and thus developers often go out of their way to set up a system where non-typescript files are watched for changes and copied.
Existing npm packages for this kind of functionality are all poorly maintained and unsafe. Currently my only option is either copying all files on any change or writing a custom script.
Examples
tsc -w --copy-filesChecklist
My suggestion meets these guidelines: