tasks/combine.js
function(inputIndex) {

            _.each(tokens, function(token, index) {
                // determain whether or not this is a file reference or a string
                if(token.file) {

                    // read the file and reset replacement to what was loaded
                    fs.readFile(token.file, 'utf8', function(e, data) {
                        if(e) {
                            grunt.fail.warn("There was an error processing the replacement '" + token.file + "' file.");
                        }
                        tokens[index].contents = data;
                        processTokenCompleteCallback();
                    });

                } else if(token.string) {
                    // we didn't need to load a file
                    tokens[index].contents = token.string;
                    processTokenCompleteCallback();
                } else {
                    processTokenCompleteCallback();
                }

            }, this);
        }
function(inputIndex) {

            _.each(tokens, function(token, index) {
                // determain whether or not this is a file reference or a string
                if(token.file) {

                    // read the file and reset replacement to what was loaded
                    fs.readFile(token.file, 'utf8', function(e, data) {
                        if(e) {
                            grunt.fail.warn("There was an error processing the replacement '" + token.file + "' file.");
                        }
                        tokens[index].contents = data;
                        processTokenCompleteCallback();
                    });

                } else if(token.string) {
                    // we didn't need to load a file
                    tokens[index].contents = token.string;
                    processTokenCompleteCallback();
                } else {
                    processTokenCompleteCallback();
                }

            }, this);
        }
function ( inputIndex ) { _ . each ( tokens , function ( token , index ) { // determain whether or not this is a file reference or a string if ( token . file ) { // read the file and reset replacement to what was loaded fs . readFile ( token . file , 'utf8' , function ( e , data ) { if ( e ) { grunt . fail . warn ( "There was an error processing the replacement '" + token . file + "' file." ) ; } tokens [ index ] . contents = data ; processTokenCompleteCallback ( ) ; } ) ; } else if ( token . string ) { // we didn't need to load a file tokens [ index ] . contents = token . string ; processTokenCompleteCallback ( ) ; } else { processTokenCompleteCallback ( ) ; } } , this ) ; }
Processes all of the passed replacements
@for grunt-combine
@method processReplacements
Processes all of the passed replacements