autogen/autogen-core.js
function processFile(autogenContext, commentInfo, callback) {
    fs.readFile(path.resolve(__dirname, "..", autogenContext.filePath), function (readError, sourceFileContentsBuffer) {
        if (readError) {
            callback(autogenContext.filePath, readError);
            return;
        }

        processNextAutogenBlock(autogenContext, sourceFileContentsBuffer.toString(), commentInfo, 0, function (result, autogenError) {
            //Write results if the content was changed (don't need to re-write the same content)
            if (sourceFileContentsBuffer.toString() != result)
                fs.writeFile(path.resolve(__dirname, "..", autogenContext.filePath), result, {}, function (writeError) {
                    callback(autogenContext.filePath, writeError);
                });
            else
                callback(autogenContext.filePath, autogenError);
        });
    });
}
function processFile(autogenContext, commentInfo, callback) {
    fs.readFile(path.resolve(__dirname, "..", autogenContext.filePath), function (readError, sourceFileContentsBuffer) {
        if (readError) {
            callback(autogenContext.filePath, readError);
            return;
        }

        processNextAutogenBlock(autogenContext, sourceFileContentsBuffer.toString(), commentInfo, 0, function (result, autogenError) {
            //Write results if the content was changed (don't need to re-write the same content)
            if (sourceFileContentsBuffer.toString() != result)
                fs.writeFile(path.resolve(__dirname, "..", autogenContext.filePath), result, {}, function (writeError) {
                    callback(autogenContext.filePath, writeError);
                });
            else
                callback(autogenContext.filePath, autogenError);
        });
    });
}
function processFile ( autogenContext , commentInfo , callback ) { fs . readFile ( path . resolve ( __dirname , ".." , autogenContext . filePath ) , function ( readError , sourceFileContentsBuffer ) { if ( readError ) { callback ( autogenContext . filePath , readError ) ; return ; } processNextAutogenBlock ( autogenContext , sourceFileContentsBuffer . toString ( ) , commentInfo , 0 , function ( result , autogenError ) { //Write results if the content was changed (don't need to re-write the same content) if ( sourceFileContentsBuffer . toString ( ) != result ) fs . writeFile ( path . resolve ( __dirname , ".." , autogenContext . filePath ) , result , { } , function ( writeError ) { callback ( autogenContext . filePath , writeError ) ; } ) ; else callback ( autogenContext . filePath , autogenError ) ; } ) ; } ) ; }
Processes the contents of the specified file, and writes the result back to the same location
Processes the contents of the specified file and writes the result back to the same location