typescript-file-copy-plugin
v1.0.1
Published
[](https://www.npmjs.com/package/typescript-file-copy-plugin)  [ and a destination (dest). The src and dest fields can include glob patterns for flexible file and directory copying.
Here is an example of how to configure the plugin:
{
"compilerOptions": {
"plugins": [
{
"transform": "typescript-file-copy-plugin",
"copy": [
{
"src": "src/assets/*",
"dest": "dist/assets"
},
{
"src": "src/config.json",
"dest": "dist/config.json"
}
]
}
]
}
}Example Configurations
Copy a Single File:
{ "transform": "typescript-file-copy-plugin", "copy": [ { "src": "src/single-file.txt", "dest": "dist/single-file.txt" } ] }Copy an Entire Directory:
{ "transform": "typescript-file-copy-plugin", "copy": [ { "src": "src/directory/*", "dest": "dist/directory" } ] }Copy Files Matching a Wildcard Pattern:
{ "transform": "typescript-file-copy-plugin", "copy": [ { "src": "src/wildcard/*.txt", "dest": "dist/wildcard" } ] }Recursive Copy Using Double Wildcard Pattern:
{ "transform": "typescript-file-copy-plugin", "copy": [ { "src": "src/double-wildcard/**/*", "dest": "dist/double-wildcard" } ] }Copy Source File to Destination File:
{ "transform": "typescript-file-copy-plugin", "copy": [ { "src": "src/single-file.txt", "dest": "dist/single-file-copy.txt" } ] }
