1
0

text-replace.js 778 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * grunt-text-replace
  3. * https://github.com/Yoni/grunt-4-test
  4. *
  5. * Copyright (c) 2013 Jonathan Holmes
  6. * Licensed under the MIT license.
  7. */
  8. var gruntTextReplace = require('../lib/grunt-text-replace');
  9. module.exports = function(grunt) {
  10. // Please see the grunt documentation for more information regarding task
  11. // creation: https://github.com/gruntjs/grunt/blob/devel/docs/toc.md
  12. grunt.registerMultiTask('replace',
  13. 'General purpose text replacement for grunt. Allows you to replace ' +
  14. 'text in files using strings, regexs or functions.',
  15. function () {
  16. gruntTextReplace.replace({
  17. src: this.data.src,
  18. dest: this.data.dest,
  19. overwrite: this.data.overwrite,
  20. replacements: this.data.replacements
  21. });
  22. });
  23. };