Copy directories?
rohan-deshpande opened this issue · 2 comments
Heya, was really happy when I found this package, potentially solves a huge problem for me BUT!
I am wondering, is there a way to just copy entire directories without specifying the files? Like I have a package which simply has an assets
directory and I want to copy it to my project's public
directory.
I've tried setting the assets
config in my package's package.json
like so
"assets": [
"assets/**/*"
],
and also
"assets": [
"assets/"
],
But neither seem to work. The problem is I have a pretty deeply nested structure and I don't want to have to go through and identify every single file which needs to be copied.
I could probably create a custom script for this but would prefer to be able to use this package if possible.
Thanks in advance!
Honestly I haven't been using this at all, but if you want to send a PR go ahead. You might be better off looking into webpack, which can bundle JS and copy needed external files when configured properly.
Yeah I'm already using webpack with create react app, it's all good, I wrote a simple bash script to do what I want and put a script into my package json to get it done
#!/usr/bin/env bash
cp -r node_modules/$1/assets public
"assets": "sh scripts/assets <package_name>",