Skip to content

juanpin/grunt-node-inspector

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grunt-node-inspector

Run node-inspector as a grunt task for easy configuration and integration with the rest of your workflow

NPM version Dependency Status

Getting Started

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, install this plugin with this command:

npm install grunt-node-inspector --save-dev

Then add this line to your project's Gruntfile.js gruntfile:

grunt.loadNpmTasks('grunt-node-inspector');

Documentation

Usage

The minimal usage of node-inspector runs with no options:

'node-inspector': {
  dev: {}
}

When this is run, node-inspector will be available at 0.0.0.0:8080.

Here is a config that uses all of the available options for node-inspector:

'node-inspector': {
  custom: {
    options: {
      'web-port': 1337,
      'web-host': 'localhost',
      'debug-port': 5857,
      'save-live-edit': true,
      'stack-trace-limit': 4
    }
  }
}

Options

web-port

Type: Number Default: 8080

Port to host the inspector.

web-host

Type: String Default: '0.0.0.0'

Host to listen on.

debug-port

Type: Number Default: 5858

Port to connect to the debugging app.

save-live-edit

Type: Boolean Default: false

Save live edit changes to disk.

stack-trace-limit

Type: Number Default: 50

Number of stack frames to show on a breakpoint.

Changelog

0.1.3 - Bumped node-inspector version to ~0.7.0, adding --no-preload option for faster loading.

0.1.2 - Bumped node-inspector version to ~0.6.0, adding the new --stack-trace-limit option. Allowed node-inspector to be listed as a dependency in a project's package.json instead of forcing it to be in grunt-node-inspector's node_modules folder.

0.1.1 - Bumped node-inspector version to ~0.5.0.

0.1.0 - Added debug-port and save-live-edit options. Renamed port to web-port and host to web-host to match node-inspector cli naming.

Breaking changes:

options.host is now options['web-host'] and options.port is now options['web-port'].

0.0.1 - Initial release

About

Grunt task to run node-inspector

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%