External task import. #1

Open
sebv opened this Issue Nov 17, 2012 · 0 comments

1 participant

@sebv

Am trying to figure how to use external tasks. Is the method below the correct way?

tasks.js

module.exports = function(rivet) {
  require('./hello.js')(rivet);
}

hello.js

module.exports = function(rivet) {
  rivet.desc('say hello');
  rivet.task('hello', function() {
    console.log('Hello!');
  });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment