arloliu / copy-node-modules

Fast deploy Node.js modules from local source folder to distination folder
26 stars 14 forks source link

Allow ncp filter option #12

Closed SirMomster closed 6 years ago

SirMomster commented 6 years ago

Small changes that would allow usage of the ncp filter option when using copy-node-modules programatically.

SirMomster commented 6 years ago

@ezze Thanks, I'm glad that I can help, this is my first pull request and your response broke the ice for me.

I added support for the CLI it allows Regular Expressions now. But in ncp they match the folder path before matching files. I thought this was important to know so I added it to the readme.md.

I totally forgot to do the documentation, sorry for that. But I did it now, I added an example function for a filter method, the JSDoc option and documentation for the CLI.

If something is wrong let me know and I will fix it.

Fyi. I use your module for a Lerna, typescript project with AWS Lambda, copying node_modules that where "linked" included there dependencies, which I at first removed afterwards but this took a lot of time. Which resulted in this pull request. Thanks for the plugin, it is a great addition to my setup! Saving me about 30-60 mins a day.

arloliu commented 6 years ago

Thanks for your help, I'll merge this pull and publish a new version.