Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-twitter

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-twitter

Make your build system tweet

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-twitter Build Status Coverage Status NPM version

Dependency Status devDependency Status

Twitter plugin for gulp 3.

Usage

First, install gulp-twitter as a development dependency:

npm install --save-dev gulp-twitter

Then, add it to your gulpfile.js:

var gulp = require('gulp');
var twitter = require('gulp-twitter');

// Construct `oauth` config.
var oauth = {
    consumerKey: process.env.CONSUMER_KEY,
    consumerSecret: process.env.CONSUMER_SECRET,
    accessToken: process.env.ACCESS_TOKEN,
    accessTokenSecret: process.env.ACCESS_TOKEN_SECRET
};

gulp.task('tweetie', function () {
    return gulp.src('package.json')
           .pipe(twitter(oauth, 'Watch me while I tweet this.'));
});

or use it as a reporter for a lint or test plugin like so

var jshint = require('gulp-jshint');

gulp.task('scripts', function () {
    var message = function (file) {
        var ret = file.relative;
        if (file.jshint.success) {
            ret = ret  + ' looks good.';
        } else {
            ret = ret + ' seems off.';
        }
        return ret;
    };
    
    return gulp.src('*.js')
               .pipe(jshint())
               .pipe(twitter(oauth, message);
            
});

API

twitter(oauth, message)

oauth

Type: Object Default: {}

OAuth credentials, i.e.

{
    "consumerKey": "CONSUMER_KEY",
    "consumerSecret": "CONSUMER_SECRET",
    "accessToken": "ACCESS_TOKEN",
    "accessTokenSecret": "ACCESS_TOKEN_SECRET"
}

Create a Twitter App and get OAuth credentials (if you haven’t already). Be careful, these tokens are like passwords so you should guard them carefully. For usage with Travis CI see the documentation on encryption keys.

message

Type: String or Function Default: ''

If you pass a Function this will be passed a gulp-util.File Object (see https://github.com/wearefractal/gulp-util/#new-fileobj) and should return a String, e.g. function (file) {return 'gulp-tweeting ' + file.relative;}.

Results

tweet

License

MIT License © Jan Raasch

Keywords

FAQs

Package last updated on 24 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc