grunt-port-checker

0.1.0 • Public • Published

grunt-port-checker

Based on npm module portchecker. Verify that a port is available and update grunt configurations as necessary.

Getting Started

This plugin requires Grunt ~0.4.2

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-port-checker --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-port-checker');

The "portChecker" task

Overview

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

grunt.initConfig({
  portChecker: {
 
  },
});

target

Type: String

The configuration path to where the port is defined as an integer

affectPaths

Type: Array Optional

An array of url configuration paths affected by the port change (e.g. 'jasmine.options.host')

Usage Examples

Default Options

In this example, the default options are used to do something with whatever. So if the testing file has the content Testing and the 123 file had the content 1 2 3, the generated result would be Testing, 1 2 3.

grunt.initConfig({
  port_checker: {
    target: 'connect.test.options.port',
    affectPaths: ['jasmine.options.host']
  },
});

Release History

(Nothing yet)

Readme

Keywords

none

Package Sidebar

Install

npm i grunt-port-checker

Weekly Downloads

6

Version

0.1.0

License

none

Last publish

Collaborators

  • guillaumepm