Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including hum with all npm packages installed. Try it out:

var hum = require("hum")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

hum v2.1.7

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

hum NPM version Build Status Dependency Status

Play with grunt.


  • 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.


npm install hum --save


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');

    path: '</path/to/search>',
.task('blah') // blah is defined in my-task
    // task name
    blah: {
        // target must be defined
        test: {
    verbose: true

Constructor: hum(options)

Creates a hum instance.


type path

The path(s) to search tasks from.


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.


type Boolean, default to false

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


Similar to grunt.loadNpmTasks(moduleName)


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


Similar to grunt.initConfig(config)


Sets options for grunt cli.

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


The promised callback.


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free