🚀 Socket Launch Week 🚀 Day 5: Introducing Socket Fix.Learn More
Socket
Sign inDemoInstall
Socket

grunt-kill

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-kill

Grunt task to kill a process using either a already-known PID or pid file

1.0.0
latest
Source
npm
Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

grunt-kill

Validate processes from grunt.

Requires grunt 0.4

Install

npm install grunt-kill --save-dev

Add the following to load the task into your Gruntfile:

grunt.loadNpmTasks('grunt-kill');

Configure

grunt-kill is a multi-task, meaning you can create targets with different configurations.

There are 4 ways you can specify the pid to kill:

  • Specify the pid directly with the pid option
  • Give a function with the pid option which returns the pid
  • Point to a pid file with the pid option
  • Use the standard grunt source file settings to specify pid files.

Examples specifying a pidfile in your Gruntfile:

kill: {
  myService: {
    src: [ 'my-service.pid' ]
  },
  secondary: {
    pid: 'secondary.pid'
  }
}

Example specifying a pid directly:

kill: {
  simpleService: {
    pid: 5741
  }
}

Example with a function:

kill: {
  functionCallExample: {
    pid: function () {
      return locateMyService().getPid();
    }
  }
}

Only synchronous functions are supported at this time.

Running Tests

Most of the code in this plugin has unit tests. To run them all to check for regressions, run just grunt, like so:

$ grunt

This will lint all of the JavaScript source files, the Gruntfile itself, and run all unit tests.

Release History

  • 2015-08-23   v1.0.0   First official release

Keywords

gruntplugin

FAQs

Package last updated on 23 Aug 2015

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