index.js
function (options) {

        var me = this;
        var filter = options && options.filter;

        var hashMap = me.hashMap;
        var dependencyMap = me.dependencyMap;

        return me.custom(function (file, callback) {

            if (!filter || !filter(file)) {

                var hash = me.getFileHash(
                    file.path,
                    hashMap,
                    dependencyMap,
                    true
                );

                var filePath = me.renameFile(file, hash);
                if (filePath) {
                    file.path = filePath;
                }

            }

            callback();

        });

    }
function (options) {

        var me = this;
        var filter = options && options.filter;

        var hashMap = me.hashMap;
        var dependencyMap = me.dependencyMap;

        return me.custom(function (file, callback) {

            if (!filter || !filter(file)) {

                var hash = me.getFileHash(
                    file.path,
                    hashMap,
                    dependencyMap,
                    true
                );

                var filePath = me.renameFile(file, hash);
                if (filePath) {
                    file.path = filePath;
                }

            }

            callback();

        });

    }
生成文件名带有哈希值的文件

@param {Object} options
@property {Function=} options.filter