Giter VIP home page Giter VIP logo

shipit-utils's Introduction

shipit-utils

Install

npm install --save shipit-utils

Usage

var utils = require('shipit-utils');

Methods

utils.getShipit(gruntOrShipit)

Returns the Shipit object, regardless of your context (Grunt or Shipit).

var shipit = utils.getShipit(gruntOrShipit);

utils.registerTask(gruntOrShipit, name, [description,] task)

Register a task, regardless of your context (Grunt or Shipit).

The description arguement is optional, and will only try to pass along a task description if you are using Grunt (it will be ignored if you are using Shipit).

task Fn|Array<String>

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.

Examples

var task = function() {
    return shipit.local('sleep 10s');
};

// Register a (blocking) task
utils.registerTask(gruntOrShipit, 'myTask', task);

// Run a series of tasks in order
utils.registerTask(gruntOrShipit, 'myTask', ['some', 'other', 'tasks']);

utils.runTask(gruntOrShipit, task)

Run a task or array of tasks, regardless of your context (Grunt or Shipit).

task String|Array<String>

utils.equalValues(values)

Test to see if all the values in an array are equal. Useful for determining if multiple remote servers are out of sync.

values Array

License

MIT

shipit-utils's People

Contributors

timkelty avatar gregberge avatar travco avatar

Watchers

Sven Wagner avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.