title: How do I replace template variables on copy with grunt?
body: <p>I'm using <a href="https://github.com/firstandthird/load-grunt-config" rel="nofollow noreferrer">load-grunt-config</a> and <a href="https://github.com/gruntjs/grunt-contrib-copy" rel="nofollow noreferrer">grunt-contrib-copy</a>, and I'm trying to get the copy task to replace some template tags with the 'process' option.</p>
  
  <p>I know that replacing template tags is possible (from the grunt-contrib-copy documentation), but I'm not able to get it to work. What I'm trying to do is replace the string <code>&lt;%= init.project.name %&gt;</code> in "style.css" with the template variable of the same name (entered by the user with grunt-prompt).</p>
  
  <p>On copy I want grunt to replace the template variable in the style.css file, with the value that it has in memory. But it doesn't do this when I use the code I have below. Does anyone know what I'm doing wrong?</p>
  
  <p>Grunt copy task</p>
  
  <pre><code>// -------------------------------------
  // Grunt copy
  // -------------------------------------
  
  module.exports = {
  
    // ----- Copy files for initialization (selected with grunt prompt) ----- //
  
    init: {
      files: [{
        cwd: 'init/php/templates',
        src: '&lt;%= init.php.templates %&gt;',
        dest: 'src/php/templates',
        expand: true
      }, {
        cwd: 'init/php/includes',
        src: '&lt;%= init.php.includes %&gt;',
        dest: 'src/php/includes',
        expand: true
      }, {
        cwd: 'init/js',
        src: '&lt;%= init.scripts %&gt;',
        dest: 'src/js',
        expand: true
      }, {
        cwd: 'init/css',
        src: 'style.css',
        dest: 'src/css',
        expand: true,
        options: {
          process: function (content, srcpath) {
            return grunt.template.process(content);
          }
        }
      }]
    }
  };
  </code></pre>
  
  <p>Css file (wordpress)</p>
  
  <pre><code>/*
  Theme Name: &lt;%= init.project.name %&gt;
  Theme URI: 
  Description: Description
  Version: 1.0
  Author: Name
  Author URI: uri
  Tags: Tags
  */
  </code></pre>
  
  <hr>
  
  <p>I've tried <a href="https://stackoverflow.com/a/18630220/1694077">this</a> answer, but <code>processContent</code> has been replaced by <code>process</code>, and this answer does not seem to work any longer (even when changing <code>processContent</code> to <code>process</code>).</p>