npm install --save shipit-utils
var utils = require('shipit-utils');
Returns the Shipit object, regardless of your context (Grunt or Shipit).
var shipit = utils.getShipit(gruntOrShipit);
Register a task, regardless of your context (Grunt or Shipit).
Task function or array of task names to run in order. Note: If in a Grunt context and passing an array of task names, task will always be synchronous/blocking.
Register task as async or blocking. Default: false
.
var task = function() {
return shipit.local('sleep 10s');
};
// Async task
utils.registerTask(gruntOrShipit, task);
// Blocking task
utils.registerTask(gruntOrShipit, 'myTask', task, false);
// Run a series of tasks in order
utils.registerTask(gruntOrShipit, 'myTask', ['some', 'other', 'tasks']);
Run a task or array of tasks, regardless of your context (Grunt or Shipit).
Test to see if all the values in an array are equal. Useful for determining if multiple remote servers are out of sync.
MIT