1

I am using grunt-contrib-copy and trying to copy the contents of my src folder into my dist folder, while excluding some directories.

src
├── bower_components
│   └── ...
├── components
│   ├── html5shiv.js
│   └── jquery.min.js
├── js
│   └── ...
├── scss
│   └── ...
└── index.html

my grunt task:

copy: {
  main: {
    expand: true,
    flatten: true,
    src: ['src/*', '!src/js', '!src/scss', '!src/bower_components'],
    dest: 'dist/',
  },
}

I want this:

dist
├── components
│   ├── html5shiv.js
│   └── jquery.min.js
└── index.html

But I'm getting this:

dist
├── components
└── index.html

What am I doing wrong? Thanks for looking.

jonyonsno
  • 11
  • 5
  • Use the following pattern and see if it makes a difference ``src: ['src/**/*.*', '!src/js', '!src/scss', '!src/bower_components'],`` – Prayag Verma Jan 04 '16 at 03:38

0 Answers0