Open CSester opened 9 years ago
+1 I'm confused as well!
fs-extra actually uses this library for copying, but checks whether the directory exists first and creates it if not. However I don't think this will address the ultimate filter issue.
With the power of regex, you can solve this issue:
/^[A-Za-z\-\/]*(\.php|$)/
This will match:
But won't match:
Simply add additional file extensions to match to the regex or statement e.g. (\.php|\.html|$)
Running from package.json
"build:php": "ncp src build --filter=^[A-Za-z\\-\/]*\\(\\.php\\|$\\)",
It does copy all of the folders even if they are empty but hey, it works!
Hi, I tried to copy all json files in a folder without success.
As the source folder name doesn't fit the *.json mask, content is not explored. Did I misunderstand the purpose of the filter, or should only filenames be checked, and not folder names ?
Regards