0
grunt copyオプションでファイルの名前を変更した後、元のファイルを削除したいと思います。 ファイルの名前が変更されましたが、元のファイルは削除されずにそのまま残ります。 以下のコードを検索してください。ここでgrunt_copyで名前を変更して元のファイルを削除
rename: {
files: [
{
expand: true,
flatten: true,
cwd: '.tmp/public/min',
src: ['production.*.*'],
dest: '.tmp/public/min/',
rename: function(dest, src) {
return dest + src.replace('production','production.v'+timestamp);
}
}]
},
は、私が使用するモジュールは、ファイルを削除するためにgrunt-contrib-clean
を使用することができ、
grunt-contrib-copy
ファイルを削除するにはgrunt-contrib-cleanを使用する必要があります。 – Mad
@Vishwanath、それはとても古くてメンテナンスが難しいものです。お勧めしません。 – Mad