index.js
function () {
                        //Render the full file
                        return ejs.renderFile(file, data, options, function (error, content) {
                            if (error) {
                                self.emit("error", error);
                                return callback(-2);
                            }
                            //Call the provided callback with the file content
                            return callback({
                                "data": new Buffer(content), 
                                "mimeType": "text/html"
                            });
                        });
                    }
function () {
                        //Render the full file
                        return ejs.renderFile(file, data, options, function (error, content) {
                            if (error) {
                                self.emit("error", error);
                                return callback(-2);
                            }
                            //Call the provided callback with the file content
                            return callback({
                                "data": new Buffer(content), 
                                "mimeType": "text/html"
                            });
                        });
                    }
function ( ) { //Render the full file return ejs . renderFile ( file , data , options , function ( error , content ) { if ( error ) { self . emit ( "error" , error ) ; return callback ( - 2 ) ; } //Call the provided callback with the file content return callback ( { "data" : new Buffer ( content ) , "mimeType" : "text/html" } ) ; } ) ; }
Render template function
Render template function