使用grunt-contrib-copy复制目录及其内容

时间:2015-12-13 19:35:18

标签: gruntjs grunt-contrib-copy

我正在使用grunt-contrib-copy并尝试将我的src文件夹的内容复制到我的dist文件夹中,同时排除某些目录。

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

我的笨蛋任务:

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

我想要这个:

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

但我得到了这个:

dist
├── components
└── index.html

我做错了什么?谢谢你的期待。

0 个答案:

没有答案