src/aria/templates/ClassGenerator.js
function (out) {
            var tplParam = out.templateParam;
            var res = tplParam.$res;
            if (res) {
                out.writeln("$resources: {");
                out.increaseIndent();
                var first = true;
                for (var key in res) {
                    if (res.hasOwnProperty(key)) {
                        out.writeln(first ? "" : ",", out.stringify(key), ": ", this._getResourceDependency(out, res[key]));
                        first = false;
                    }
                }
                out.decreaseIndent();
                out.writeln("},");
            }
            var css = tplParam.$css;
            if (css && css.length) {
                out.writeln("$css: [");
                out.increaseIndent();
                for (var i = 0, l = css.length; i < l; i++) {
                    out.writeln("require(", out.stringify(Aria.getLogicalPath(css[i], ".tpl.css")), (i == l - 1
                            ? ")"
                            : "),"));
                }
                out.decreaseIndent();
                out.writeln("],");
            }
            var texts = tplParam.$texts;
            if (texts) {
                out.writeln("$texts: {");
                out.increaseIndent();
                var first = true;
                for (var key in texts) {
                    if (texts.hasOwnProperty(key)) {
                        out.writeln(first ? "" : ",", out.stringify(key), ": require(", out.stringify(Aria.getLogicalPath(texts[key], ".tpl.txt"))
                                + ")");
                        first = false;
                    }
                }
                out.decreaseIndent();
                out.writeln("},");
            }
        }
function (out) {
            var tplParam = out.templateParam;
            var res = tplParam.$res;
            if (res) {
                out.writeln("$resources: {");
                out.increaseIndent();
                var first = true;
                for (var key in res) {
                    if (res.hasOwnProperty(key)) {
                        out.writeln(first ? "" : ",", out.stringify(key), ": ", this._getResourceDependency(out, res[key]));
                        first = false;
                    }
                }
                out.decreaseIndent();
                out.writeln("},");
            }
            var css = tplParam.$css;
            if (css && css.length) {
                out.writeln("$css: [");
                out.increaseIndent();
                for (var i = 0, l = css.length; i < l; i++) {
                    out.writeln("require(", out.stringify(Aria.getLogicalPath(css[i], ".tpl.css")), (i == l - 1
                            ? ")"
                            : "),"));
                }
                out.decreaseIndent();
                out.writeln("],");
            }
            var texts = tplParam.$texts;
            if (texts) {
                out.writeln("$texts: {");
                out.increaseIndent();
                var first = true;
                for (var key in texts) {
                    if (texts.hasOwnProperty(key)) {
                        out.writeln(first ? "" : ",", out.stringify(key), ": require(", out.stringify(Aria.getLogicalPath(texts[key], ".tpl.txt"))
                                + ")");
                        first = false;
                    }
                }
                out.decreaseIndent();
                out.writeln("},");
            }
        }
function ( out ) { var tplParam = out . templateParam ; var res = tplParam . $res ; if ( res ) { out . writeln ( "$resources: {" ) ; out . increaseIndent ( ) ; var first = true ; for ( var key in res ) { if ( res . hasOwnProperty ( key ) ) { out . writeln ( first ? "" : "," , out . stringify ( key ) , ": " , this . _getResourceDependency ( out , res [ key ] ) ) ; first = false ; } } out . decreaseIndent ( ) ; out . writeln ( "}," ) ; } var css = tplParam . $css ; if ( css && css . length ) { out . writeln ( "$css: [" ) ; out . increaseIndent ( ) ; for ( var i = 0 , l = css . length ; i < l ; i ++ ) { out . writeln ( "require(" , out . stringify ( Aria . getLogicalPath ( css [ i ] , ".tpl.css" ) ) , ( i == l - 1 ? ")" : ")," ) ) ; } out . decreaseIndent ( ) ; out . writeln ( "]," ) ; } var texts = tplParam . $texts ; if ( texts ) { out . writeln ( "$texts: {" ) ; out . increaseIndent ( ) ; var first = true ; for ( var key in texts ) { if ( texts . hasOwnProperty ( key ) ) { out . writeln ( first ? "" : "," , out . stringify ( key ) , ": require(" , out . stringify ( Aria . getLogicalPath ( texts [ key ] , ".tpl.txt" ) ) + ")" ) ; first = false ; } } out . decreaseIndent ( ) ; out . writeln ( "}," ) ; } }
Write to the current block of the class writer the dependencies of the template, including JS classes,
resources, templates, css, macrolibs and text templates.
@param {aria.templates.ClassWriter} out
@protected
Write to the current block of the class writer the dependencies of the template including JS classes resources templates css macrolibs and text templates .