Gulpfile not working when module.exports references a Gulp task not a function?
<p>I have a sprite task in a gulp file: </p>

<pre><code>var sprite = function() {
  // Do something
};

module.exports = {
  sprite: sprite
};
</code></pre>

<p>This was working but I now need to a run annother task prior to the sprite task. I need this prior task to complete before the sprite task runs, so Im using runSequence:</p>

<pre><code>var spriteFirst = function() {
  // Do something first
};

var spriteSecond = function() {
  // Do something second 
};

gulp.task('sprite', function(callback) {
  runSequence('spriteFirst', 'spriteSecond',
    callback);
});

module.exports = {
  sprite: sprite
};
</code></pre>

<p>This code gives me the following error:</p>

<pre><code>ReferenceError: sprite is not defined
</code></pre>

<p>It seems that the module.exports recognises 'sprite' if its a normal function, but not if its a Gulp task. Is this correct? If so why is this the case? </p>