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.

Installation

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:

grunt.loadNpmTasks('grunt-patch');

Usage

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.

grunt.initConfig({
  patch: {
    options: {
    patch: 'test/fixtures/default.patch'
  },
  files: {
    'tmp/output.default.patched': 'test/fixtures/input.default'
  }
});

License

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.a1713459820rtnat1713459820ten@s1713459820elas1713459820 or by filling in the form at www.nettantra.com/contact, we can certainly help you out with it.