🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# C.62 PatchTask The `PatchTask` uses the [patch](http://savannah.gnu.org/projects/patch) program to apply diff file to originals. **NB:** the `patch` program must be in the system path! Table C.73:聽Attributes NameTypeDescriptionDefaultRequired`patchfile``String`File that includes the diff outputn/aYes`originalfile``String`File to patch. If not specified Task tries to guess it from the diff filenoneNo`destfile``String`File to send the output to instead of patching the file in placenoneNo`backups``Boolean`Keep backups of the unpatched files`false`No`quiet``Boolean`Work silently unless an error occurs`false`No`reverse``Boolean`Assume patch was created with old and new files swapped`false`No`ignorewhitespace``Boolean`Ignore whitespace differences`false`No`strip``Integer`Strip the smallest prefix containing specified number of leading slashes from filenamesnoneNo`dir``String`The directory in which to run the patch commandnoneNo`haltonfailure``Boolean`Stop the build process if the patching process encounters an error.`false`No C.62.1 Example ``` <patch patchfile="/path/to/patches/file.ext.patch" dir="/path/to/original" /> ``` Apply "file.ext.path" to original file locataed in "/path/to/original" folder.