Grunt-patch is a Node.JS module which can be used to patch files using grunt. This supports dual directions,  where one can both apply patches as well as generate patches.


This plugin requires Grunt ~0.4.5

npm install grunt-patch --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:



Default Options

In this example, the default options are used to patch an input file named input.default with default.patchto output a patched file named output.default.patched.

  patch: {
    options: {
    patch: 'test/fixtures/default.patch'
  files: {
    'tmp/output.default.patched': 'test/fixtures/input.default'


The MIT License

Looking out for a dynamic, reliable and scalable web-applications developed on Node.JS? Do not hesitate to contact us at  moc.a1664713180rtnat1664713180ten@s1664713180elas1664713180 or by filling in the form at, we can certainly help you out with it.