module.exports = function(grunt) {

  /**
   * Apply the scaffolding to the Drupal docroot.
   */
  grunt.registerTask('scaffold', 'Apply the scaffolding from ' + grunt.config('config.srcPaths.drupal') + '/ to the Drupal docroot.', function() {
    var path = require('path');
    if (!require('fs').existsSync(path.join(grunt.config('config.buildPaths.html'), 'index.php'))) {
      grunt.fail.fatal('Cannot apply scaffolding until after Drupal has been built.');
    }

    var done = this.async(),
      drupal = require('../lib/drupal')(grunt);
    drupal.loadDrushStatus(function (err) {
      if (err) {
        grunt.fail.fatal('Cannot load Drush status for built Drupal docroot.');
        return done();
      }

      grunt.loadNpmTasks('grunt-contrib-symlink');

      grunt.config(['symlink', 'libraries'], {
        src: '<%= config.srcPaths.drupal %>/libraries',
        dest: drupal.libraryPath(),
      });
      grunt.config(['symlink', 'modules'], {
        src: '<%= config.srcPaths.drupal %>/modules',
        dest: path.join(drupal.modulePath(), 'custom')
      });
      grunt.config(['symlink', 'profiles'], {
        expand: true,
        cwd: '<%= config.srcPaths.drupal %>/profiles',
        src: ['*'],
        dest: drupal.profilePath(),
        filter: 'isDirectory'
      });
      grunt.config(['symlink', 'sites'], {
        expand: true,
        cwd: '<%= config.srcPaths.drupal %>/sites',
        src: ['*'],
        dest: drupal.sitePath(),
        filter: function (path) {
          return (path !== '<%= config.srcPaths.drupal %>/sites/all');
        }
      });
      grunt.config(['symlink', 'themes'], {
        src: '<%= config.srcPaths.drupal %>/themes',
        dest: path.join(drupal.themePath(), 'custom')
      });

      grunt.task.run([
        'symlink:profiles',
        'symlink:libraries',
        'symlink:modules',
        'symlink:themes',
        'copy:defaults',
        'clean:sites',
        'symlink:sites',
        'mkdir:files',
        'copy:static'
      ]);

      done();
    });
  });

  require('../lib/help')(grunt).add({
    task: 'scaffold',
    group: 'Build Process'
  });
};

@@ -814,35 +814,57 @@
 es'%5D, %7B%0A        
-src
+expand: true,%0A        cwd
 : '%3C%25= config.sr
@@ -884,32 +884,52 @@
  %25%3E/libraries',%0A
+        src: %5B'*'%5D,%0A
         dest: dr

fix path