New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

hum

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hum

Hum, hum could run grunt inside a specified cwd and search tasks from the given paths.

latest
Source
npmnpm
Version
2.1.7
Version published
Weekly downloads
13
30%
Maintainers
1
Weekly downloads
 
Created
Source

hum NPM version Build Status Dependency Status

Play with grunt.

Features

  • hum could run grunt inside a specified cwd and search tasks from the given paths.
  • hum instances will be executed in series to prevent grunt (which is composed of global variables and singletons) fucking up with himself.
  • hum provides a programmatical way to run grunt tasks.

Installation

npm install hum --save

Usage

Actually, hum is an alternative of Gruntfile.js and supplies a bunch of promise-style APIs.

With hum, you could replace the code inside 'Gruntfile.js' with hum methods, and search available tasks only from your specified paths, as well as the PATH and NODE_PATH do.

So, it becomes possible for you to run a same tier of tasks for severial different projects.

var hum = require('hum');

hum({
	path: '</path/to/search>',
	cwd: 
})
.npmTasks('my-task')
.task('blah') // blah is defined in my-task
.init({
	// task name
	blah: {
		// target must be defined
		test: {
		}
	}
})
.options({
	verbose: true
})
.done(function(err){
})

Constructor: hum(options)

Creates a hum instance.

options.path

type path

The path(s) to search tasks from.

options.cwd

type path, default to the process.cwd.

It will be added to every target of each task configuration and will affect all configurations related to files, src, and dest.

options.strict_path

type Boolean, default to false

By default, hum will concat the NODE_PATH to the end of the path list.

.npmTasks(moduleName)

Similar to grunt.loadNpmTasks(moduleName)

.task(taskname)

Specifies the tasks to run, if no task is specified, hum will try to run the 'default' task.

.init(config)

Similar to grunt.initConfig(config)

.options(options)

Sets options for grunt cli.

.options({verbose: true}) is equivalent to grunt --verbose.

.done(callback)

The promised callback.

Keywords

paths

FAQs

Package last updated on 30 Oct 2013

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