lib/config-generator.js
function(file, content) {
        var sourceMapURLMatch = REGEX_SOURCEMAP.exec(content);

        if (sourceMapURLMatch) {
            var sourceMapURL = sourceMapURLMatch[1];

            if (sourceMapURL) {
                var sourceMapContent = fs.readFileSync(path.resolve(path.dirname(file), sourceMapURL), 'utf-8');

                var consumer = new sourceMap.SourceMapConsumer(sourceMapContent);
                var node = sourceMap.SourceNode.fromStringWithSourceMap(content, consumer);

                var result = node.toStringWithSourceMap();

                content = result.code;

                var map = result.map;
                fs.writeFileSync(path.resolve(path.dirname(file), sourceMapURL), JSON.stringify(map));
            }
        }

        return content;
    }
function(file, content) {
        var sourceMapURLMatch = REGEX_SOURCEMAP.exec(content);

        if (sourceMapURLMatch) {
            var sourceMapURL = sourceMapURLMatch[1];

            if (sourceMapURL) {
                var sourceMapContent = fs.readFileSync(path.resolve(path.dirname(file), sourceMapURL), 'utf-8');

                var consumer = new sourceMap.SourceMapConsumer(sourceMapContent);
                var node = sourceMap.SourceNode.fromStringWithSourceMap(content, consumer);

                var result = node.toStringWithSourceMap();

                content = result.code;

                var map = result.map;
                fs.writeFileSync(path.resolve(path.dirname(file), sourceMapURL), JSON.stringify(map));
            }
        }

        return content;
    }
function ( file , content ) { var sourceMapURLMatch = REGEX_SOURCEMAP . exec ( content ) ; if ( sourceMapURLMatch ) { var sourceMapURL = sourceMapURLMatch [ 1 ] ; if ( sourceMapURL ) { var sourceMapContent = fs . readFileSync ( path . resolve ( path . dirname ( file ) , sourceMapURL ) , 'utf-8' ) ; var consumer = new sourceMap . SourceMapConsumer ( sourceMapContent ) ; var node = sourceMap . SourceNode . fromStringWithSourceMap ( content , consumer ) ; var result = node . toStringWithSourceMap ( ) ; content = result . code ; var map = result . map ; fs . writeFileSync ( path . resolve ( path . dirname ( file ) , sourceMapURL ) , JSON . stringify ( map ) ) ; } } return content ; }
Updates the source and source map of the processed file.

@method _updateSourceMap
@protected
@param {String} file The name of the processed file
@param {String} content The content of the processed file
@return {String} The modified content after updating the source map
Updates the source and source map of the processed file .