npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

grunt-niteo-spawn

v0.0.7

Published

A promised based spawn wrapper for grunt.

Readme

grunt-niteo-spawn

Build Status Build status

A wrapper for grunt.util.spawn that is promised based. It is worth noting that the output from the executable call is only visible if you specify the --verbose flag from the command line.

Install

npm install grunt-niteo-spawn --save-dev

Usage

The options object that is sent to the underlying grunt.util.spawn method is the this.data property accessible within the MultiTask. So, the configuration of task follows that same structure.


grunt.loadNpmTask('grunt-niteo-spawn')

grunt.initConfig = {
	niteoSpawn: {
		cmd: 'echo',
		args: [
			'hello world!'
		]
	}
}

If you're task needs to process the data passed on resolve, revoke, or notify of the promise, then you can specify functions within the configuration.


grunt.loadNpmTask('grunt-niteo-spawn')

grunt.initConfig = {
	niteoSpawn: {
		cmd: 'echo',
		args: [
			'hello world!'
		],
		success: function(result) {
			console.log result	
		}
	}
}

The example above would print out the hello world! string. If there was an error...


grunt.loadNpmTask('grunt-niteo-spawn')

grunt.initConfig = {
	niteoSpawn: {
		cmd: 'unknownCommand',
		args: [
			'hello world!'
		],
		failure: function(error) {
			console.log error	
		},
		notify: function(msg) {
			...
		}
	}
}

The stdout and stderr output from the spawned process is supressed by default. If you supply the --verbose flag you will see it. If you would like to see the output at all times, add a silent: false to the options for the target. silent is true by default.

grunt.initConfig = {
	niteoSpawn: {
		default: {
			cmd: 'echo',
			args: [
				'hello world!'
			],
			silent: false
		}
	}
}

If you NEVER want the output to be visible on the screen (because it may reveal a password in a CI server) then you can use the sensitive flag. If it is undefined or false, then nothing is changed. However, if it is set to true then the output is suppressed competely.

grunt.initConfig = {
	niteoSpawn: {
		default: {
			cmd: 'echo',
			args: [
				'<my password>'
			],
			sensitive: true
		}
	}
}

Advanced Usage

The niteoSpawn task is exposed as the grunt.niteo.spawn method on the grunt object. You can use it freely within your specialized grunt tasks as well.

grunt.loadNpmTask('grunt-niteo-spawn')

grunt.niteo.spawn({
	cmd: 'echo',
	args: [ 'hello world!' ]
}).done(function(result) {
	console.log result
})