Replaces the files from local or network source.
npm install grunt-file-replace> Replaces the files on your harddrive from local or network source.
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
``shell`
npm install grunt-file-replace --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
`js`
grunt.loadNpmTasks('grunt-file-replace');
to the data object passed into grunt.initConfig().
Remote files must beggin with http or httpsKey of the object is local file, value is remote file to grap and put on the place where key is located.
`js
grunt.initConfig({
fileReplace: {
patterns: {
'test/expected/local': 'test/fixtures/123',
'test/expected/remote': 'https://raw.github.com/danielhusar/grunt-file-replace/master/test/fixtures/123'
}
},
})
``