How to write helpers in the new Grunt 0.4

In older versions of grund, I run the following helpers:

module.exports = function (grunt) {
   grunt.registerMultiTask('taskname', "Grunt task example", function () {
      var result = grunt.helper('helpername', options, data);

      ...
   });

   grunt.registerHelper('helpername', function (options, data) {
      return data;
   });
};

How do I execute helpers in the new version of Grunt 0.4?

+5
source share
1 answer

From Update from 0.3 to 0.4 page

Assistants

Auxiliary storage is removed in favor of node require. For a brief example on how to share functions between Grunt plugins, see grunt-lib-legacyhelpers . Plugin authors should update their plugins.

+1
source

All Articles