I was hoping:
cp -R src/prog.js images/icon.jpg /tmp/package
would yield a symmetrical structure in the destination dir:
/t
Alternatively, if you're old-school, use cpio:
cd /source;
find . -print | cpio -pvdmB /target
Clearly, you can filter the file list to your heart's content.
The '-p' option is for 'pass-through' mode (as against '-i' for input or '-o' for output). The '-v' is verbose (list the files as they're processed). The '-m' preserves modification times. The '-B' means use 'big blocks' (where big blocks are 5120 bytes instead of 512 bytes); it is possible it has no effect these days.