In the Grunt.js docs, there is a "this.filessrc" option, is it possible to do "this.filesDest"?

I created a Grunt plugin for generating "manifests" in YAML or JSON format. For instance, the task can create package.json or component.json from given metadata, or by using the metadata from one of those files to build the other.

The task also includes an option for reading directories of files to generate "collections" out of files with certain file extensions. So, for example, you can create a "component" manifest that lists out the files required by the component:

{
  "name": "My Component",
  "description": "",
  "version": "",
  "scripts": {
    "jquery.js",
    "component.js"
    "one.js",
    "two.js",
    "three.js"
  },
  "styles": {
    "component.css"
  }
}

So, both src and dest are used in the task for building the "collections", however, when you are only generating a package.json or component.json for instance, you only need the dest.

I didn't find a native Grunt method for doing this, or another clean way of accomplishing the same goal?

You can use one of:

Example (simplified):

module.exports = function( grunt ) {
    "use strict";
    var util = require('util');

    grunt.initConfig({
        pkg: grunt.file.readJSON("package.json")
    });

    grunt.registerTask('default', ['normalizeMultiTaskFiles', 'expand']);

    grunt.registerTask('normalizeMultiTaskFiles', function(pattern) {
        var result = grunt.task.normalizeMultiTaskFiles(['./public/**/*']);
        console.log(util.inspect(result[0].src));
    });

    grunt.registerTask('expand', function() {
        var result = grunt.file.expand(['./public/**/*']);
        console.log(util.inspect(result));
    })
};

Output:

Running "normalizeMultiTaskFiles" task
[ './public/css',
  './public/css/main.css',
  './public/index.html',
  './public/js',
  './public/js/file1.js',
  './public/js/file2.js',
  './public/js/file3.js',
  './public/js/index.js',
  './public/js/lib',
  './public/vendor',
  './public/vendor1.js',
  './public/vendor2.js' ]

Running "expand" task
[ './public/css',
  './public/css/main.css',
  './public/index.html',
  './public/js',
  './public/js/file1.js',
  './public/js/file2.js',
  './public/js/file3.js',
  './public/js/index.js',
  './public/js/lib',
  './public/vendor',
  './public/vendor1.js',
  './public/vendor2.js' ]