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


Play with grunt.


  • humcould run gruntinside a specified cwd and search tasks from the given paths.
  • huminstances will be executed in series to prevent grunt (which is composed of global variables and singletons) fucking up with himself.
  • humprovides a programmatical way to run grunttasks.


npm install hum --save


Actually, humis an alternative of Gruntfile.jsand 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 PATHand NODE_PATHdo.

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




  • quickthumb

    On the fly, thumbnail creation middleware for express. QuickThumb QuickThumb is an on the fly, th...

    2 个月前
  • lg-thumbnail

    Thumbnail module for lightgallery. travis(

    2 年前
  • humps

    UnderscoretocamelCase converter (and vice versa) for strings and object keys in JavaScript. humps B...

    2 年前
  • humanlike

    Emulates human to generates random timeseries of web session activity Emulates human to generate ra...

    4 个月前
  • humanize-url

    Humanize a URL: → humanizeurl Build Status(

    2 年前
  • humanize-string

    Convert a camelized/dasherized/underscored string into a humanized one: → humanizestring Build S...

    1 年前
  • humanize-plus

    A simple utility library for making the web more humane. Humanize Plus npm version(

    2 年前
  • humanize-number

    Humanize a number (1000000 1,000,000) humanizenumber Humanize a number Installation ...

    2 年前
  • humanize-ms

    transform humanize time to ms humanizems NPM versionnpmimagenpmurl build statustravisimagetravisu...

    2 年前
  • humanize-list

    Comma delimit an array for human readability, the Oxford comma is optional. humanizelist Build Sta...

    1 年前


扫码加入 JavaScript 社区