UNPKG

toloframework

Version:

Javascript/HTML/CSS compiler for Firefox OS or nodewebkit apps using modules in the nodejs style.

33 lines (27 loc) 705 B
/** * Component \\$.+ */ exports.tags = ["\\$.+"]; exports.priority = 0; /** * Called the first time the component is used in the complete build * process. */ exports.initialize = function(libs) {}; /** * Called the first time the component is used in a specific HTML file. */ exports.open = function(file, libs) {}; /** * Called after a specific HTML file as been processed. And called only * if the component has been used in this HTML file. */ exports.close = function(file, libs) {}; /** * Compile a node of the HTML tree. */ exports.compile = function(root, libs) { var varName = root.name.substr(1); root.type = libs.Tree.TEXT; root.text = libs.getVar(varName); };