lib/PageScript/index.js
function renderHTML(callback) {
            async.map(codeList, function (locals, n) {
                locals.req = req;
                ViewHelper.render({
                    cache: true,
                    path: SCRIPT_JADE
                }, locals, n)
            }, function (err, buf) {
                if (!err) {
                    buf = buf || [];
                    buf.splice(0, 0, SCRIPT_START_TAG);
                    buf.push(bottomScriptList.join(""));
                    buf.push(SCRIPT_END_TAG);
                }
                callback(err, buf.join(""));
            });
        }
function renderHTML(callback) {
            async.map(codeList, function (locals, n) {
                locals.req = req;
                ViewHelper.render({
                    cache: true,
                    path: SCRIPT_JADE
                }, locals, n)
            }, function (err, buf) {
                if (!err) {
                    buf = buf || [];
                    buf.splice(0, 0, SCRIPT_START_TAG);
                    buf.push(bottomScriptList.join(""));
                    buf.push(SCRIPT_END_TAG);
                }
                callback(err, buf.join(""));
            });
        }
function renderHTML ( callback ) { async . map ( codeList , function ( locals , n ) { locals . req = req ; ViewHelper . render ( { cache : true , path : SCRIPT_JADE } , locals , n ) } , function ( err , buf ) { if ( ! err ) { buf = buf || [ ] ; buf . splice ( 0 , 0 , SCRIPT_START_TAG ) ; buf . push ( bottomScriptList . join ( "" ) ) ; buf . push ( SCRIPT_END_TAG ) ; } callback ( err , buf . join ( "" ) ) ; } ) ; }
Function renders html.
@param callback {Function} callback function - arguments - err, html
Function renders html .