gulp-twitter
Usage
First, install gulp-twitter
as a development dependency:
npm install --save-dev gulp-twitter
Then, add it to your gulpfile.js
:
var gulp = ;var twitter = ; // Construct `oauth` config.var oauth = consumerKey: processenvCONSUMER_KEY consumerSecret: processenvCONSUMER_SECRET accessToken: processenvACCESS_TOKEN accessTokenSecret: processenvACCESS_TOKEN_SECRET; gulp;
or use it as a reporter for a lint
or test
plugin like so
var jshint = ; gulp
API
twitter(oauth, message)
oauth
Type: Object
Default: {}
OAuth credentials, i.e.
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;}
.