作曲家 - 如何忽略一些地图文件?

I'm using composer in my PHP project. There is a module which maps lots of files into to root directory. This includes files like README.md and CHANGELOG.md and the generation autolod files throws an error:

[ErrorException]                                                                
Target ./README.md already exists (set extra.magento-force to override)

Is there a option to ignore a list of files from the mapping and don't use the override option?

I works like this, for example if you want to prevent the pub/.htaccess from being overwritten.

Add this to the composter.json

"extra": {
    "magento-force": "override",
    "magento-deploy-ignore": {
        "*": [
            "/pub/.htaccess"
        ]
    }
}

See here for more information: https://github.com/magento/magento-composer-installer/blob/master/doc/Deploy.md#prevent-single-files-from-deploy

Remark: On upgrading Magento versions (2.2.4 -> 2.2.5) such files still seem to be deleted, so you have to restore them from the VCS