GithubHelp home page GithubHelp logo

rlugojr / grunt-shipit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shipitjs/grunt-shipit

0.0 2.0 0.0 136 KB

Grunt plugin for Shipit automation and deployment tool.

License: MIT License

JavaScript 100.00%

grunt-shipit's Introduction

grunt-shipit

![Gitter](https://badges.gitter.im/Join Chat.svg)

Build Status Dependency Status devDependency Status

Shipit logo

Grunt plugin for Shipit, an automation engine and a deployment tool written for node / iojs.

If you prefer using Shipit without grunt, please go to Shipit repository.

Getting Started

This plugin requires Grunt ~0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-shipit --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-shipit');

Usage

Example Gruntfile.js

module.exports = function (grunt) {
  grunt.initConfig({
    shipit: {
      options: {
        workspace: '/tmp/github-monitor',
        deployTo: '/tmp/deploy_to',
        repositoryUrl: 'https://github.com/user/repo.git',
        ignores: ['.git', 'node_modules'],
        keepReleases: 2,
        key: '/path/to/key',
        shallowClone: true
      },
      staging: {
        servers: ['[email protected]', '[email protected]']
      }
    }
  });

  grunt.loadNpmTasks('grunt-shipit');
  grunt.loadNpmTasks('shipit-deploy');

  grunt.registerTask('pwd', function () {
    grunt.shipit.remote('pwd', this.async());
  });
};

Launch command

grunt shipit:<environment> <tasks ...>

For more documentation about Shipit commands please refer to Shipit repository.

For more documentation about Shipit deploy task, please refer to Shipit deploy repository.

Upgrading from v0.5.x

Methods

Now all methods returns promises, you can still use callback but the result has changed.

Before:

shipit.remote('echo "hello"', function (err, stdout, stderr) {
  console.log(stdout, stderr);
});

Now:

shipit.remote('echo "hello"', function (err, res) {
  console.log(res.stdout, res.stderr);
});

Deployment task

The deployment task is now separated from Shipit. You must install it and load it separately:

npm install shipit-deploy
grunt.loadNpmTasks('shipit-deploy');

API change

The exposed property grunt.shipit.stage is now grunt.shipit.environment.

License

MIT

grunt-shipit's People

Contributors

ebuildy avatar gitter-badger avatar gregberge avatar hellosimon avatar jaconil avatar sebgie avatar skinofstars avatar timkelty avatar yvem avatar

Watchers

 avatar  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.