Magento 2: grunt refresh, grunt documentation commands are not working

jit-grunt: Plugin for the "xxxx" task not found.
If you have installed the plugin already, please setting the static mapping.
See https://github.com/shootaroo/jit-grunt#static-mappings

After installing Magento 2 and the node modules including grunt if you are facing error like above while executing the refresh and documentation tasks you may need to update your Gruntfile.js. (Below is the working solution in Magento 2 beta at the time of writing Oct 16, 2015)

For static mapping below code should be entered just below 'use strict'; statement. So, the top of your Gruntfile.js should look like.

..........

module.exports = function (grunt) {
    'use strict';

    require('jit-grunt')(grunt, {
        refresh: 'refresh',
        usebanner: 'grunt-banner'
    });
   
    var _ = require('underscore'),
        path = require('path'),
        configDir = './dev/tools/grunt/configs',
        taskDir = './dev/tools/grunt/tasks';

..........

It should resolve the issue in your Magento 2 beta version installation ..
jit-grunt: Plugin for the "xxxx" task not found.
If you have installed the plugin already, please setting the static mapping.
See https://github.com/shootaroo/jit-grunt#static-mappings