Skip to content

Instantly share code, notes, and snippets.

@NickHeiner
Last active August 29, 2015 14:15
Show Gist options
  • Save NickHeiner/272cfe4e5db8d96c1cde to your computer and use it in GitHub Desktop.
Save NickHeiner/272cfe4e5db8d96c1cde to your computer and use it in GitHub Desktop.
A better approach
// index.js
function myTask(args) {
// do work
}
// tasks/task.js
module.exports = function(grunt) {
grunt.registerMultiTask('my-task', function() {
var myTask = require('../');
var options = this.options();
myTask(options);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment