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

grunt-before-after-hooks

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-before-after-hooks

Hook into right before and right after grunt tasks are run

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
419
decreased by-26.1%
Maintainers
1
Weekly downloads
 
Created
Source

grunt-before-after-hooks Build Status

Add hooks to run before every Grunt task and after they are all complete

Install

$ npm install --save grunt-before-after-hooks

Usage

module.exports = grunt => {
  // require it at the top and pass in the grunt instance
  require('grunt-before-after-hooks')(grunt, {
    beforeEach(currentTask) {
      console.log(JSON.stringify(currentTask));
      /*
      {"nameArgs":"plugin_tester","name":"plugin_tester","args":[],"flags":{},"errorCount":0}
      */
    },
    afterEach(previousTask) {
      console.log(JSON.stringify(currentTask));
      /*
      {"nameArgs":"plugin_tester","name":"plugin_tester","args":[],"flags":{},"errorCount":0}
      */
    },
    after() {

    }
  });

  grunt.initConfig();
}

The argument given to the beforeEach and afterEach hooks are instances of grunt.task.current.

FAQs

Package last updated on 11 Jul 2016

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