You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to rename a file when I copy it. The easiest way may be to just have a flag that means copy this file to this path/filename. You could also just check if there's one input file, check if the destination folder is actually a file, and replace it if it is.
Optional multi-file support proposal
If you still wanted to support copying globs or multiple files, the destination name could have a wildcard and you could just replace the wildcard with the matched name.
Use-case
I have a project that uses a file (.env) to store certain configuration options. I have an npm script that deploys my project, but it needs to first replace the config file with one that has the configuration options needed for deployment (.env_publish) which is currently stored in the same folder. I would like to use this package since it's super light-weight. 😄
What I'm currently trying to do: copyfiles .env_publish .env
Existing Work-around
I am aware that I can just create subfolders, and keep all config files named .env, so that when I copy them I don't have to rename them, but I would like to keep them all in the same folder.
The text was updated successfully, but these errors were encountered:
Request
I would like to be able to rename a file when I copy it. The easiest way may be to just have a flag that means copy this file to this path/filename. You could also just check if there's one input file, check if the destination folder is actually a file, and replace it if it is.
Optional multi-file support proposal
If you still wanted to support copying globs or multiple files, the destination name could have a wildcard and you could just replace the wildcard with the matched name.
Use-case
I have a project that uses a file (
.env
) to store certain configuration options. I have an npm script that deploys my project, but it needs to first replace the config file with one that has the configuration options needed for deployment (.env_publish
) which is currently stored in the same folder. I would like to use this package since it's super light-weight. 😄What I'm currently trying to do:
copyfiles .env_publish .env
Existing Work-around
I am aware that I can just create subfolders, and keep all config files named
.env
, so that when I copy them I don't have to rename them, but I would like to keep them all in the same folder.The text was updated successfully, but these errors were encountered: