Say I have this directory setup:
+-- gruntfile.js
|
+-- src/
| |
| +-- lib/
| |
| +-- imgs/**
| |
| +-- js/**
And I want to create a distribution folder using grunt-contrib-copy:
+-- gruntfile.js
|
+-- app/
| |
| +-- lib/
| |
| +-- imgs/**
| |
| +-- js/**
|
+-- src/**
Note that the src folder is not listed within the dist folder. So far, all my efforts end up like this:
+-- gruntfile.js
|
+-- app/
| |
| +-- src/
| |
| +-- lib/
| |
| +-- imgs/**
| |
| +-- js/**
+-- src/**
I've tried many different configurations, but here's the one I'm on currently:
{
expand: true,
src: ['src/lib/**'],
dest: 'app/',
flatten: false,
filter: 'isFile'
}
Remember that I want to copy everything recursively below src into app, but without the src folder coming with it.
Add the
cwdproperty to your config and modify thesrc, so it looks like this: