私は次のような構造をコピーしようとしています:
src
|-a
|-b
|-c
||-ca
||-cb
dest
|-a
|-b
|-c
||-ca
||-cb
ただし、src ディレクトリ自体が dest ディレクトリに表示されないと、これを達成できないようです。すなわち
src
|-a
|-b
|-c
||-ca
||-cb
dest
|src
||-a
||-b
||-c
|||-ca
|||-cb
私のコピー設定は次のように設定されています:
files: [
{src: [targetDirectory+"index.html"], dest: buildDirectory, expand: true},
{src: [targetDirectory+"*.png"], dest: buildDirectory, expand: true},
{src: [targetDirectory+minJSDestination], dest: buildDirectory, expand: true},
{src: [targetDirectory+minCSSDestination], dest: buildDirectory, expand: true},
{src: [targetDirectory+"assets/fonts/**.*"], dest: buildDirectory, expand: true},
{src: [targetDirectory+"assets/images/**.*"], dest: buildDirectory, expand: true},
{src: [targetDirectory+"assets/partials/**.*"], dest: buildDirectory, expand: true},
{src: [targetDirectory+"src/*.js"], dest: buildDirectory, expand: true}
]
dest から「src」ディレクトリを削除する flatten オプションを試しましたが、他のディレクトリも削除し、各ファイルを dest のルート レベルに配置します。
「cwd」を宛先ディレクトリとソースディレクトリに設定しようとしましたが、これはコピーをすべて一緒に防ぐようです。
これを可能にするオプションがあるに違いないと確信していますが、まだ見つけていません。誰にもアイデアはありますか?