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

grunt-tweet

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-tweet

Tweet from Grunt task.

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

grunt-tweet

Tweet from Grunt task.

Getting Started

This plugin requires Grunt ~0.4.1

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-tweet --save-dev

After that it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-tweet');

The "tweet" task

Overview

In your project’s Gruntfile, add a section named tweet to the data object passed into grunt.initConfig():

grunt.initConfig({
  tweet: {
    options: {
      // OAuth credentials
      consumer_key: '...',
      consumer_secret: '...',
      access_token: '...',
      access_token_secret: '...'
    },
    release: {
      options: {
        crop: true // Crop tweet if it’s too long
      },
      text: 'The 0.0.1 release',
      url: 'https://github.com/owner/repo/releases/tag/0.0.1'
    },
  },
})

Create an Twitter App and get OAuth credentials (if you haven’t already). Be careful, these tokens are like passwords so you should guard them carefully.

Best practice is to store credentials in separate gitignored-file, tweet.json for example:

{
  "consumer_key": "voLyIigS0FHaX6XDIA5zA",
  "consumer_secret": "sdiacB4CaMzeYDuLQE4zq9LdJrjjWrP7toqI77Fwk",
  "access_token": "3698193540-1iOOCcL60k7PA9RNq8mQtr9EAYwCwlHGh9IO3P8",
  "access_token_secret": "DeIdfCh7rCuHCU01AgHJGVHL3KfYYMDhMY7gks3I9s"
}

…and to read it in Gruntfile.json like so:

grunt.initConfig({
  tweet: {
    options: grunt.file.readJSON('tweet.json')
  },
  release: {}
})

Release History

0.0.3, Oct 8 2013

Add root Gruntfile.js for development and testing.

0.0.2, Oct 8 2013

Better log. Minor development things.

0.0.1, Oct 8 2013

Initial commit.

Keywords

FAQs

Package last updated on 08 Oct 2013

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