haml-coffee
Advanced tools
Comparing version 0.5.3 to 0.5.4
@@ -495,3 +495,3 @@ var require = function (file, cwd) { | ||
if (/^(\s)*$/.test(line)) continue; | ||
while (/^%.*[{(]/.test(expression) && !/^(\s*)[-=~.%#<]/.test(lines[0]) && /(?:(\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|"\w+[\w:-]*\w?")\s*=\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[\w@.]+)|(:\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|"\w+[\w:-]*\w?")\s*=>\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[-\w@.()\[\]'"]+)|(\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|'\w+[\w:-]*\w?'):\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[-\w@.()\[\]'"]+))/.test(lines[0])) { | ||
while (/^%.*[{(]/.test(expression) && !/^(\s*)[-=&!~.%#<]/.test(lines[0]) && /(?:(\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|"\w+[\w:-]*\w?")\s*=\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[\w@.]+)|(:\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|"\w+[\w:-]*\w?")\s*=>\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[-\w@.()\[\]'"]+)|(\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|'\w+[\w:-]*\w?'):\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[-\w@.()\[\]'"]+))/.test(lines[0])) { | ||
attributes = lines.shift(); | ||
@@ -539,3 +539,3 @@ expression += ' ' + attributes.match(/^(\s*)(.*)/)[2]; | ||
segments = ("" + namespace + "." + templateName).replace(/(\s|-)+/g, '_').split(/\./); | ||
templateName = segments.pop(); | ||
templateName = this.options.basename ? segments.pop() : segments.pop().split(/\/|\\/).pop(); | ||
namespace = segments.shift(); | ||
@@ -1128,3 +1128,3 @@ if (segments.length !== 0) { | ||
if (interpolation = klass.match(/#{(.*)}/)) { | ||
classes += interpolation[1] + ','; | ||
classes += "(" + interpolation[1] + "),"; | ||
} else { | ||
@@ -1131,0 +1131,0 @@ classes += "'" + klass + "',"; |
@@ -1,1 +0,1 @@ | ||
var require=function(a,b){var c=require.resolve(a,b||"/"),d=require.modules[c];if(!d)throw new Error("Failed to resolve module "+a+", tried "+c);var e=d._cached?d._cached:d();return e};require.paths=[],require.modules={},require.extensions=[".js",".coffee"],require._core={assert:!0,events:!0,fs:!0,path:!0,vm:!0},require.resolve=function(){return function(a,b){function g(a){if(require.modules[a])return a;for(var b=0;b<require.extensions.length;b++){var c=require.extensions[b];if(require.modules[a+c])return a+c}}function h(a){a=a.replace(/\/+$/,"");var b=a+"/package.json";if(require.modules[b]){var d=require.modules[b](),e=d.browserify;if(typeof e=="object"&&e.main){var f=g(c.resolve(a,e.main));if(f)return f}else if(typeof e=="string"){var f=g(c.resolve(a,e));if(f)return f}else if(d.main){var f=g(c.resolve(a,d.main));if(f)return f}}return g(a+"/index")}function i(a,b){var c=j(b);for(var d=0;d<c.length;d++){var e=c[d],f=g(e+"/"+a);if(f)return f;var i=h(e+"/"+a);if(i)return i}var f=g(a);if(f)return f}function j(a){var b;a==="/"?b=[""]:b=c.normalize(a).split("/");var d=[];for(var e=b.length-1;e>=0;e--){if(b[e]==="node_modules")continue;var f=b.slice(0,e+1).join("/")+"/node_modules";d.push(f)}return d}b||(b="/");if(require._core[a])return a;var c=require.modules.path(),d=b||".";if(a.match(/^(?:\.\.?\/|\/)/)){var e=g(c.resolve(d,a))||h(c.resolve(d,a));if(e)return e}var f=i(a,d);if(f)return f;throw new Error("Cannot find module '"+a+"'")}}(),require.alias=function(a,b){var c=require.modules.path(),d=null;try{d=require.resolve(a+"/package.json","/")}catch(e){d=require.resolve(a,"/")}var f=c.dirname(d),g=Object_keys(require.modules);for(var h=0;h<g.length;h++){var i=g[h];if(i.slice(0,f.length+1)===f+"/"){var j=i.slice(f.length);require.modules[b+j]=require.modules[f+j]}else i===f&&(require.modules[b]=require.modules[f])}},require.define=function(a,b){var c=require._core[a]?"":require.modules.path().dirname(a),d=function(a){return require(a,c)};d.resolve=function(a){return require.resolve(a,c)},d.modules=require.modules,d.define=require.define;var e={exports:{}};require.modules[a]=function(){return require.modules[a]._cached=e.exports,b.call(e.exports,d,e,e.exports,c,a),require.modules[a]._cached=e.exports,e.exports}};var Object_keys=Object.keys||function(a){var b=[];for(var c in a)b.push(c);return b};typeof process=="undefined"&&(process={}),process.nextTick||(process.nextTick=function(a){setTimeout(a,0)}),process.title||(process.title="browser"),process.binding||(process.binding=function(a){if(a==="evals")return require("vm");throw new Error("No such module")}),process.cwd||(process.cwd=function(){return"."}),require.define("path",function(a,b,c,d,e){function f(a,b){var c=[];for(var d=0;d<a.length;d++)b(a[d],d,a)&&c.push(a[d]);return c}function g(a,b){var c=0;for(var d=a.length;d>=0;d--){var e=a[d];e=="."?a.splice(d,1):e===".."?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}var h=/^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/;c.resolve=function(){var a="",b=!1;for(var c=arguments.length;c>=-1&&!b;c--){var d=c>=0?arguments[c]:process.cwd();if(typeof d!="string"||!d)continue;a=d+"/"+a,b=d.charAt(0)==="/"}return a=g(f(a.split("/"),function(a){return!!a}),!b).join("/"),(b?"/":"")+a||"."},c.normalize=function(a){var b=a.charAt(0)==="/",c=a.slice(-1)==="/";return a=g(f(a.split("/"),function(a){return!!a}),!b).join("/"),!a&&!b&&(a="."),a&&c&&(a+="/"),(b?"/":"")+a},c.join=function(){var a=Array.prototype.slice.call(arguments,0);return c.normalize(f(a,function(a,b){return a&&typeof a=="string"}).join("/"))},c.dirname=function(a){var b=h.exec(a)[1]||"",c=!1;return b?b.length===1||c&&b.length<=3&&b.charAt(1)===":"?b:b.substring(0,b.length-1):"."},c.basename=function(a,b){var c=h.exec(a)[2]||"";return b&&c.substr(-1*b.length)===b&&(c=c.substr(0,c.length-b.length)),c},c.extname=function(a){return h.exec(a)[3]||""}}),require.define("/haml-coffee.js",function(a,b,c,d,e){((function(){var c,d,e,f,g,h,i,j,k;h=a("./nodes/node"),i=a("./nodes/text"),f=a("./nodes/haml"),c=a("./nodes/code"),d=a("./nodes/comment"),e=a("./nodes/filter"),k=a("./util/text").whitespace,j=a("./util/text").indent,b.exports=g=function(){function a(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;this.options=a!=null?a:{},(i=(b=this.options).escapeHtml)==null&&(b.escapeHtml=!0),(j=(c=this.options).escapeAttributes)==null&&(c.escapeAttributes=!0),(k=(d=this.options).cleanValue)==null&&(d.cleanValue=!0),(l=(e=this.options).uglify)==null&&(e.uglify=!1),(m=(f=this.options).format)==null&&(f.format="html5"),(n=(g=this.options).preserveTags)==null&&(g.preserveTags="pre,textarea"),(o=(h=this.options).selfCloseTags)==null&&(h.selfCloseTags="meta,img,link,br,hr,input,area,param,col,base")}return a.prototype.indentChanged=function(){return this.currentIndent!==this.previousIndent},a.prototype.isIndent=function(){return this.currentIndent>this.previousIndent},a.prototype.updateTabSize=function(){if(this.tabSize===0)return this.tabSize=this.currentIndent-this.previousIndent},a.prototype.updateBlockLevel=function(){this.currentBlockLevel=this.currentIndent/this.tabSize;if(this.currentBlockLevel-Math.floor(this.currentBlockLevel)>0)throw"Indentation error in line "+this.lineNumber;if((this.currentIndent-this.previousIndent)/this.tabSize>1)throw"Block level too deep in line "+this.lineNumber;return this.delta=this.previousBlockLevel-this.currentBlockLevel},a.prototype.updateCodeBlockLevel=function(a){return a instanceof c?this.currentCodeBlockLevel=a.codeBlockLevel+1:this.currentCodeBlockLevel=a.codeBlockLevel},a.prototype.updateParent=function(){return this.isIndent()?this.pushParent():this.popParent()},a.prototype.pushParent=function(){return this.stack.push(this.parentNode),this.parentNode=this.node},a.prototype.popParent=function(){var a,b,c;c=[];for(a=0,b=this.delta-1;0<=b?a<=b:a>=b;0<=b?a++:a--)c.push(this.parentNode=this.stack.pop());return c},a.prototype.getNodeOptions=function(a){return a==null&&(a={}),{parentNode:a.parentNode||this.parentNode,blockLevel:a.blockLevel||this.currentBlockLevel,codeBlockLevel:a.codeBlockLevel||this.currentCodeBlockLevel,escapeHtml:a.escapeHtml||this.options.escapeHtml,escapeAttributes:a.escapeAttributes||this.options.escapeAttributes,cleanValue:a.cleanValue||this.options.cleanValue,format:a.format||this.options.format,preserveTags:a.preserveTags||this.options.preserveTags,selfCloseTags:a.selfCloseTags||this.options.selfCloseTags,uglify:a.uglify||this.options.uglify}},a.prototype.nodeFactory=function(a){var b,g,h;return a==null&&(a=""),g=this.getNodeOptions(),a.match(/^:(escaped|preserve|css|javascript|plain|cdata|coffeescript)/)?b=new e(a,g):a.match(/^(\/|-#)(.*)/)?b=new d(a,g):a.match(/^(-#|-|=|!=|\&=|~)\s*(.*)/)?b=new c(a,g):a.match(/^(%|#|\.|\!)(.*)/)?b=new f(a,g):b=new i(a,g),(h=g.parentNode)!=null&&h.addChild(b),b},a.prototype.parse=function(a){var b,c,d,f,g,j,k,l;a==null&&(a=""),this.line_number=this.previousIndent=this.tabSize=this.currentBlockLevel=this.previousBlockLevel=0,this.currentCodeBlockLevel=this.previousCodeBlockLevel=0,this.node=null,this.stack=[],this.root=this.parentNode=new h("",this.getNodeOptions()),f=a.split("\n");while((d=f.shift())!==void 0){if(this.node instanceof e&&!this.exitFilter)if(/^(\s)*$/.test(d))this.node.addChild(new i("",this.getNodeOptions({parentNode:this.node})));else{g=d.match(/^(\s*)(.*)/),k=g[1],c=g[2];if(this.node.blockLevel>=k.length/2){this.exitFilter=!0,f.unshift(d);continue}j=d.match(RegExp("^\\s{"+(this.node.blockLevel*2+2)+"}(.*)")),j&&this.node.addChild(new i(j[1],this.getNodeOptions({parentNode:this.node})))}else{this.exitFilter=!1,g=d.match(/^(\s*)(.*)/),k=g[1],c=g[2];if(/^(\s)*$/.test(d))continue;while(/^%.*[{(]/.test(c)&&!/^(\s*)[-=~.%#<]/.test(f[0])&&/(?:(\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|"\w+[\w:-]*\w?")\s*=\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[\w@.]+)|(:\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|"\w+[\w:-]*\w?")\s*=>\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[-\w@.()\[\]'"]+)|(\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|'\w+[\w:-]*\w?'):\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[-\w@.()\[\]'"]+))/.test(f[0]))b=f.shift(),c+=" "+b.match(/^(\s*)(.*)/)[2],this.line_number++;if(c.match(/(\s)+\|$/)){c=c.replace(/(\s)+\|$/," ");while((l=f[0])!=null?l.match(/(\s)+\|$/):void 0)c+=f.shift().match(/^(\s*)(.*)/)[2].replace(/(\s)+\|$/,""),this.line_number++}this.currentIndent=k.length,this.indentChanged()&&(this.updateTabSize(),this.updateBlockLevel(),this.updateParent(),this.updateCodeBlockLevel(this.parentNode)),this.node=this.nodeFactory(c),this.previousBlockLevel=this.currentBlockLevel,this.previousIndent=this.currentIndent}this.line_number++}return this.evaluate(this.root)},a.prototype.evaluate=function(a){var b,c,d,e;e=a.children;for(c=0,d=e.length;c<d;c++)b=e[c],this.evaluate(b);return a.evaluate()},a.prototype.render=function(a,b){var c,d,e,f,g;b==null&&(b="window.HAML"),e="",d=(""+b+"."+a).replace(/(\s|-)+/g,"_").split(/\./),a=d.pop(),b=d.shift();if(d.length!==0)for(f=0,g=d.length;f<g;f++)c=d[f],b+="."+c,e+=""+b+" ?= {}\n";else e+=""+b+" ?= {}\n";return e+=""+b+"['"+a+"'] = (context) -> ( ->\n",e+=""+j(this.precompile(),1),e+=").call(context)",e},a.prototype.precompile=function(){var a,b;b="",a=this.createCode(),a.indexOf("$e")!==-1&&(this.options.customHtmlEscape?b+="$e = "+this.options.customHtmlEscape+"\n":b+="$e = (text, escape) ->\n \"#{ text }\"\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/'/g, ''')\n .replace(/\"/g, '"')\n"),a.indexOf("$c")!==-1&&(this.options.customCleanValue?b+="$c = "+this.options.customCleanValue+"\n":b+="$c = (text) -> if text is null or text is undefined then '' else text\n");if(a.indexOf("$p")!==-1||a.indexOf("$fp")!==-1)this.options.customPreserve?b+="$p = "+this.options.customPreserve+"\n":b+="$p = (text) -> text.replace /\\n/g, '
'\n";return a.indexOf("$fp")!==-1&&(this.options.customFindAndPreserve?b+="$fp = "+this.options.customFindAndPreserve+"\n":b+="$fp = (text) ->\n text.replace /<("+this.options.preserveTags.split(",").join("|")+')>([^]*?)<\\/\\1>/g, (str, tag, content) ->\n "<#{ tag }>#{ $p content }</#{ tag }>"\n'),b+="$o = []\n",b+=""+a+"\n",b+='return $o.join("\\n")'+this.cleanupWhitespace(a)+"\n"},a.prototype.createCode=function(){var a,b,c,d,e,f,g,h,i,j;b=[],this.lines=[],i=this.root.children;for(e=0,g=i.length;e<g;e++)a=i[e],this.lines=this.lines.concat(a.render());this.lines=this.combineText(this.lines),j=this.lines;for(f=0,h=j.length;f<h;f++){c=j[f];if(c!==null)switch(c.type){case"text":b.push(""+k(c.cw)+'$o.push "'+k(c.hw)+c.text+'"');break;case"run":b.push(""+k(c.cw)+c.code);break;case"insert":d="",c.findAndPreserve&&(d+="$fp "),c.preserve&&(d+="$p "),c.escape&&(d+="$e "),this.options.cleanValue&&(d+="$c "),b.push(""+k(c.cw)+'$o.push "'+k(c.hw)+'" + '+d+c.code)}}return b.join("\n")},a.prototype.combineText=function(a){var b,c,d;b=[];while((c=a.shift())!==void 0){if(c.type==="text")while(a[0]&&a[0].type==="text"&&c.cw===a[0].cw)d=a.shift(),c.text+="\\n"+k(d.hw)+d.text;b.push(c)}return b},a.prototype.cleanupWhitespace=function(a){return/\u0091|\u0092/.test(a)?".replace(/[\\s\\n]*\\u0091/mg, '').replace(/\\u0092[\\s\\n]*/mg, '')":""},a}()})).call(this)}),require.define("/nodes/node.js",function(a,b,c,d,e){((function(){var c,d;d=a("../util/text").escapeHTML,b.exports=c=function(){function a(a,b){this.expression=a!=null?a:"",b==null&&(b={}),this.parentNode=b.parentNode,this.children=[],this.opener=this.closer=null,this.silent=!1,this.preserveTags=b.preserveTags.split(","),this.preserve=!1,this.wsRemoval={around:!1,inside:!1},this.escapeHtml=b.escapeHtml,this.escapeAttributes=b.escapeAttributes,this.cleanValue=b.cleanValue,this.format=b.format,this.selfCloseTags=b.selfCloseTags.split(","),this.uglify=b.uglify,this.codeBlockLevel=b.codeBlockLevel,this.blockLevel=b.blockLevel}return a.CLEAR_WHITESPACE_LEFT="",a.CLEAR_WHITESPACE_RIGHT="",a.prototype.addChild=function(a){return this.children.push(a),this},a.prototype.getOpener=function(){return this.wsRemoval.around&&this.opener.text&&(this.opener.text=a.CLEAR_WHITESPACE_LEFT+this.opener.text),this.wsRemoval.inside&&this.opener.text&&(this.opener.text+=a.CLEAR_WHITESPACE_RIGHT),this.opener},a.prototype.getCloser=function(){return this.wsRemoval.inside&&this.closer.text&&(this.closer.text=a.CLEAR_WHITESPACE_LEFT+this.closer.text),this.wsRemoval.around&&this.closer.text&&(this.closer.text+=a.CLEAR_WHITESPACE_RIGHT),this.closer},a.prototype.isPreserved=function(){return this.preserve?!0:this.parentNode?this.parentNode.isPreserved():!1},a.prototype.markText=function(a,b){return b==null&&(b=!1),{type:"text",cw:this.codeBlockLevel,hw:this.uglify?0:this.blockLevel-this.codeBlockLevel,text:b?d(a):a}},a.prototype.markRunningCode=function(a){return{type:"run",cw:this.codeBlockLevel,code:a}},a.prototype.markInsertingCode=function(a,b,c,d){return b==null&&(b=!1),c==null&&(c=!1),d==null&&(d=!1),{type:"insert",cw:this.codeBlockLevel,hw:this.uglify?0:this.blockLevel-this.codeBlockLevel,escape:b,preserve:c,findAndPreserve:d,code:a}},a.prototype.evaluate=function(){},a.prototype.render=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;b=[];if(this.silent)return b;if(this.children.length===0)this.opener&&this.closer?(d=this.getOpener(),d.text+=this.getCloser().text,b.push(d)):!this.preserve&&this.isPreserved()?b.push(this.getOpener()):b.push(this.getOpener());else if(this.opener&&this.closer)if(this.preserve){this.wsRemoval.inside=!0,b.push(this.getOpener()),o=this.children;for(e=0,i=o.length;e<i;e++){a=o[e],p=a.render();for(f=0,j=p.length;f<j;f++)c=p[f],c.hw=this.blockLevel,b.push(c)}b.push(this.getCloser())}else{b.push(this.getOpener()),q=this.children;for(g=0,k=q.length;g<k;g++)a=q[g],b=b.concat(a.render());b.push(this.getCloser())}else if(this.opener){b.push(this.getOpener()),r=this.children;for(h=0,l=r.length;h<l;h++)a=r[h],b=b.concat(a.render())}else{s=this.children;for(n=0,m=s.length;n<m;n++)a=s[n],b.push(this.markText(a.render().text))}return b},a}()})).call(this)}),require.define("/util/text.js",function(a,b,c,d,e){b.exports={whitespace:function(a){var b;a*=2,b=[];while(b.length<a)b.push(" ");return b.join("")},escapeQuotes:function(a){return a?a.replace(/"/g,'\\"'):""},escapeHTML:function(a){return a?a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\"/g,"""):""},preserve:function(a){if(a)return a.replace(/<(pre|textarea)>(.*?)<\/\1>/g,function(a){return a.replace("\\n","
")})},indent:function(a,c){return a.replace(/^(.*)$/mg,b.exports.whitespace(c)+"$1")}}}),require.define("/nodes/text.js",function(a,b,c,d,e){((function(){var c,d,e,f=Object.prototype.hasOwnProperty,g=function(a,b){function d(){this.constructor=a}for(var c in b)f.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};c=a("./node"),e=a("../util/text").escapeQuotes,b.exports=d=function(){function a(){a.__super__.constructor.apply(this,arguments)}return g(a,c),a.prototype.evaluate=function(){return this.opener=this.markText(e(this.expression))},a}()})).call(this)}),require.define("/nodes/haml.js",function(a,b,c,d,e){((function(){var c,d,e,f=Object.prototype.hasOwnProperty,g=function(a,b){function d(){this.constructor=a}for(var c in b)f.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=a("./node"),e=a("../util/text").escapeQuotes,b.exports=c=function(){function a(){a.__super__.constructor.apply(this,arguments)}return g(a,d),a.prototype.evaluate=function(){var a,b,c,d,f,g;g=this.parseExpression(this.expression);if(g.doctype)return this.opener=this.markText(""+e(this.buildDocType(g.doctype)));if(this.isNotSelfClosing(g.tag)){f=e(this.buildHtmlTagPrefix(g));if(g.assignment){d=g.assignment.match(/^(=|!=|&=|~)\s*(.*)$/),c=d[1],a=d[2];if(c==="~")b="#{$fp "+a+" }";else if(c==="&="||c==="="&&this.escapeHtml)this.preserve?this.cleanValue?b="#{ $p($e($c("+a+"))) }":b="#{ $p($e("+a+")) }":this.cleanValue?b="#{ $e($c("+a+")) }":b="#{ $e("+a+") }";else if(c==="!="||c==="="&&!this.escapeHtml)this.preserve?this.cleanValue?b="#{ $p($c("+a+")) }":b="#{ $p("+a+") }":this.cleanValue?b="#{ $c("+a+") }":b="#{ "+a+" }";return this.opener=this.markText(""+f+">"+b),this.closer=this.markText("</"+g.tag+">")}return g.text?(this.opener=this.markText(""+f+">"+g.text),this.closer=this.markText("</"+g.tag+">")):(this.opener=this.markText(f+">"),this.closer=this.markText("</"+g.tag+">"))}return g.tag=g.tag.replace(/\/$/,""),f=e(this.buildHtmlTagPrefix(g)),this.opener=this.markText(""+f+(this.format==="xhtml"?" /":"")+">")},a.prototype.parseExpression=function(a){var b,c,d,e,f,g,h,i,j;f=this.parseTag(a),this.preserveTags.indexOf(f.tag)!==-1&&(this.preserve=!0),e=(i=f.ids)!=null?i.pop():void 0,d=f.classes,c=[];if(f.attributes){j=f.attributes;for(g=0,h=j.length;g<h;g++)b=j[g],b.key==="id"?e?e+="_"+b.value:e=b.value:b.key==="class"?(d||(d=[]),d.push(b.value)):c.push(b)}return{doctype:f.doctype,tag:f.tag,id:e,classes:d,text:f.text,attributes:c,assignment:f.assignment}},a.prototype.parseTag=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;try{return e=(n=a.match(/^(\!{3}.*)/))!=null?n[1]:void 0,e?{doctype:e}:(l=a.match(/^((?:[#%\.][a-z0-9_:\-]*[\/]?)+)(?:([\(\{].*[\)\}])?([\<\>]{0,2})(?=[=&!~])(.*)?|([\(\{].*[\)\}])?([\<\>]{0,2}))(.*)?/i),f=l[1],c=l[2]||l[5],m=l[3]||l[6],b=l[4]||l[7],b&&!b.match(/^(=|!=|&=|~)/)&&(k=b.replace(/^ /,""),b=void 0),m&&(m.indexOf(">")!==-1&&(this.wsRemoval.around=!0),m.indexOf("<")!==-1&&(this.wsRemoval.inside=!0,this.preserve=!0)),j=f.match(/\%([a-z_\-][a-z0-9_:\-]*[\/]?)/i),h=f.match(/\#([a-z_\-][a-z0-9_\-]*)/gi),d=f.match(/\.([a-z0-9_\-]*)/gi),{tag:j?j[1]:"div",ids:h?function(){var a,b,c;c=[];for(a=0,b=h.length;a<b;a++)g=h[a],c.push(g.substr(1));return c}():void 0,classes:d?function(){var a,b,c;c=[];for(a=0,b=d.length;a<b;a++)i=d[a],c.push(i.substr(1));return c}():void 0,attributes:this.parseAttributes(c),assignment:b,text:k})}catch(o){throw"Unable to parse tag from "+a+": "+o}},a.prototype.parseAttributes=function(a){var b,c,d,e,f,g,h,i,j;b=[];if(a===void 0)return b;j=this.getDataAttributes(a),a=j[0],d=j[1],e=/(?:(\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|"\w+[\w:-]*\w?")\s*=\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[\w@.]+)|(:\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|"\w+[\w:-]*\w?")\s*=>\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[-\w@.()\[\]'"]+)|(\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|"\w+[\w:-]*\w?"):\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[-\w@.()\[\]'"]+))/g;while(g=e.exec(a)){f=(g[1]||g[3]||g[5]).replace(/^:/,""),i=g[2]||g[4]||g[6],c=!1;if(["false",""].indexOf(i)===-1){["true"].indexOf(i)!==-1?(i="'"+f+"'",c=!0):i.match(/^("|').*\1$/)||(this.escapeAttributes?this.cleanValue?i="'#{ $e($c("+i+")) }'":i="'#{ $e("+i+") }'":this.cleanValue?i="'#{ $c("+i+") }'":i="'#{ ("+i+") }'");if(h=i.match(/^("|')(.*)\1$/))i=h[2];if(h=f.match(/^("|')(.*)\1$/))f=h[2];b.push({key:f,value:i,bool:c})}}return b.concat(d)},a.prototype.getDataAttributes=function(a){var b,c,d,e,f;d=/:?data:?\s*(?:=>\s*)?\{([^}]*)\},?/gi.exec(a);if(d!=null?!d[1]:!void 0)return[a,[]];a=a.replace(d[0],""),c=this.parseAttributes(d[1]);for(e=0,f=c.length;e<f;e++)b=c[e],b.key="data-"+b.key;return[a,c]},a.prototype.buildHtmlTagPrefix=function(a){var b,c,d,e,f,g,h,i,j,k,l;f=["<"+a.tag];if(a.classes){c=a.classes.sort().join(" ");if(a.classes.length>1&&c.match(/#\{/)){c="#{ [",k=a.classes;for(g=0,i=k.length;g<i;g++)e=k[g],(d=e.match(/#{(.*)}/))?c+=d[1]+",":c+="'"+e+"',";c+="].sort().join(' ') }"}f.push("class='"+c+"'")}a.id&&f.push("id='"+a.id+"'");if(a.attributes){l=a.attributes;for(h=0,j=l.length;h<j;h++)b=l[h],b.bool&&this.format==="html5"?f.push(""+b.key):f.push(""+b.key+"="+this.quoteAttributeValue(b.value))}return f.join(" ")},a.prototype.quoteAttributeValue=function(a){var b;return a.indexOf("'")===-1?b="'"+a+"'":b='"'+a+'"',b},a.prototype.buildDocType=function(a){switch(""+this.format+" "+a){case"xhtml !!! XML":return"<?xml version='1.0' encoding='utf-8' ?>";case"xhtml !!!":return'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';case"xhtml !!! 1.1":return'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">';case"xhtml !!! mobile":return'<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">';case"xhtml !!! basic":return'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">';case"xhtml !!! frameset":return'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">';case"xhtml !!! 5":case"html5 !!!":return"<!DOCTYPE html>";case"html5 !!! XML":case"html4 !!! XML":return"";case"html4 !!!":return'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';case"html4 !!! frameset":return'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">';case"html4 !!! strict":return'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">'}},a.prototype.isNotSelfClosing=function(a){return this.selfCloseTags.indexOf(a)===-1&&!a.match(/\/$/)},a}()})).call(this)}),require.define("/nodes/code.js",function(a,b,c,d,e){((function(){var c,d,e=Object.prototype.hasOwnProperty,f=function(a,b){function d(){this.constructor=a}for(var c in b)e.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=a("./node"),b.exports=c=function(){function a(){a.__super__.constructor.apply(this,arguments)}return f(a,d),a.prototype.evaluate=function(){var a,b,c;b=this.expression.match(/(-|!=|\&=|=|~)\s?(.*)?/),c=b[1],a=b[2];if(c==="-"){this.opener=this.markRunningCode(a);if(this.children.length!==0&&this.opener.code.match(/(->|=>)/))return this.closer=this.markRunningCode(" ''")}else{if(c==="~")return this.escapeHtml?this.opener=this.markInsertingCode(a,!0,!1,!0):this.opener=this.markInsertingCode(a,!1,!1,!0);if(c==="&="||c==="="&&this.escapeHtml)return this.opener=this.markInsertingCode(a,!0);if(c==="!="||c==="="&&!this.escapeHtml)return this.opener=this.markInsertingCode(a)}},a}()})).call(this)}),require.define("/nodes/comment.js",function(a,b,c,d,e){((function(){var c,d,e=Object.prototype.hasOwnProperty,f=function(a,b){function d(){this.constructor=a}for(var c in b)e.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=a("./node"),b.exports=c=function(){function a(){a.__super__.constructor.apply(this,arguments)}return f(a,d),a.prototype.evaluate=function(){var a,b,c,d;d=this.expression.match(/(-#|\/\[|\/)\s?(.*)?/),b=d[0],c=d[1],a=d[2];switch(c){case"-#":return this.silent=!0,this.opener=this.markText("");case"/[":return this.opener=this.markText("<!--["+a+">"),this.closer=this.markText("<![endif]-->");case"/":return a?(this.opener=this.markText("<!-- "+a),this.closer=this.markText(" -->")):(this.opener=this.markText("<!--"),this.closer=this.markText("-->"))}},a}()})).call(this)}),require.define("/nodes/filter.js",function(a,b,c,d,e){((function(){var c,d,e,f=Object.prototype.hasOwnProperty,g=function(a,b){function d(){this.constructor=a}for(var c in b)f.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=a("./node"),e=a("../util/text").whitespace,b.exports=c=function(){function a(){a.__super__.constructor.apply(this,arguments)}return g(a,d),a.prototype.evaluate=function(){var a;return this.filter=(a=this.expression.match(/:(escaped|preserve|css|javascript|coffeescript|plain|cdata|coffeescript)(.*)?/))!=null?a[1]:void 0},a.prototype.render=function(){var a,b,c,d,e,f,g,h,i,j;c=[];switch(this.filter){case"escaped":i=this.children;for(e=0,g=i.length;e<g;e++)a=i[e],c.push(this.markText(a.render()[0].text,!0));break;case"preserve":d="",j=this.children;for(f=0,h=j.length;f<h;f++)a=j[f],d+=""+a.render()[0].text+"
";d=d.replace(/\&\#x000A;$/,""),c.push(this.markText(d));break;case"plain":this.renderFilterContent(0,c);break;case"css":this.format==="html5"?c.push(this.markText("<style>")):c.push(this.markText("<style type='text/css'>")),this.format==="xhtml"&&c.push(this.markText(" /*<![CDATA[*/")),b=this.format==="xhtml"?2:1,this.renderFilterContent(b,c),this.format==="xhtml"&&c.push(this.markText(" /*]]>*/")),c.push(this.markText("</style>"));break;case"javascript":this.format==="html5"?c.push(this.markText("<script>")):c.push(this.markText("<script type='text/javascript'>")),this.format==="xhtml"&&c.push(this.markText(" //<![CDATA[")),b=this.format==="xhtml"?2:1,this.renderFilterContent(b,c),this.format==="xhtml"&&c.push(this.markText(" //]]>")),c.push(this.markText("</script>"));break;case"cdata":c.push(this.markText("<![CDATA[")),this.renderFilterContent(2,c),c.push(this.markText("]]>"));break;case"coffeescript":this.renderFilterContent(0,c,"run")}return c},a.prototype.renderFilterContent=function(a,b,c){var d,f,g,h,i,j,k,l,m,n,o;c==null&&(c="text"),f=[],h=0,n=this.children;for(j=0,l=n.length;j<l;j++)d=n[j],f.push(d.render()[0].text);o=[];for(k=0,m=f.length;k<m;k++){i=f[k];if(i==="")o.push(h+=1);else{switch(c){case"text":for(g=0;0<=h?g<h:g>h;0<=h?g++:g--)b.push(this.markText(""));b.push(this.markText(""+e(a)+i));break;case"run":b.push(this.markRunningCode(""+i))}o.push(h=0)}}return o},a}()})).call(this)}) | ||
var require=function(a,b){var c=require.resolve(a,b||"/"),d=require.modules[c];if(!d)throw new Error("Failed to resolve module "+a+", tried "+c);var e=d._cached?d._cached:d();return e};require.paths=[],require.modules={},require.extensions=[".js",".coffee"],require._core={assert:!0,events:!0,fs:!0,path:!0,vm:!0},require.resolve=function(){return function(a,b){function g(a){if(require.modules[a])return a;for(var b=0;b<require.extensions.length;b++){var c=require.extensions[b];if(require.modules[a+c])return a+c}}function h(a){a=a.replace(/\/+$/,"");var b=a+"/package.json";if(require.modules[b]){var d=require.modules[b](),e=d.browserify;if(typeof e=="object"&&e.main){var f=g(c.resolve(a,e.main));if(f)return f}else if(typeof e=="string"){var f=g(c.resolve(a,e));if(f)return f}else if(d.main){var f=g(c.resolve(a,d.main));if(f)return f}}return g(a+"/index")}function i(a,b){var c=j(b);for(var d=0;d<c.length;d++){var e=c[d],f=g(e+"/"+a);if(f)return f;var i=h(e+"/"+a);if(i)return i}var f=g(a);if(f)return f}function j(a){var b;a==="/"?b=[""]:b=c.normalize(a).split("/");var d=[];for(var e=b.length-1;e>=0;e--){if(b[e]==="node_modules")continue;var f=b.slice(0,e+1).join("/")+"/node_modules";d.push(f)}return d}b||(b="/");if(require._core[a])return a;var c=require.modules.path(),d=b||".";if(a.match(/^(?:\.\.?\/|\/)/)){var e=g(c.resolve(d,a))||h(c.resolve(d,a));if(e)return e}var f=i(a,d);if(f)return f;throw new Error("Cannot find module '"+a+"'")}}(),require.alias=function(a,b){var c=require.modules.path(),d=null;try{d=require.resolve(a+"/package.json","/")}catch(e){d=require.resolve(a,"/")}var f=c.dirname(d),g=Object_keys(require.modules);for(var h=0;h<g.length;h++){var i=g[h];if(i.slice(0,f.length+1)===f+"/"){var j=i.slice(f.length);require.modules[b+j]=require.modules[f+j]}else i===f&&(require.modules[b]=require.modules[f])}},require.define=function(a,b){var c=require._core[a]?"":require.modules.path().dirname(a),d=function(a){return require(a,c)};d.resolve=function(a){return require.resolve(a,c)},d.modules=require.modules,d.define=require.define;var e={exports:{}};require.modules[a]=function(){return require.modules[a]._cached=e.exports,b.call(e.exports,d,e,e.exports,c,a),require.modules[a]._cached=e.exports,e.exports}};var Object_keys=Object.keys||function(a){var b=[];for(var c in a)b.push(c);return b};typeof process=="undefined"&&(process={}),process.nextTick||(process.nextTick=function(a){setTimeout(a,0)}),process.title||(process.title="browser"),process.binding||(process.binding=function(a){if(a==="evals")return require("vm");throw new Error("No such module")}),process.cwd||(process.cwd=function(){return"."}),require.define("path",function(a,b,c,d,e){function f(a,b){var c=[];for(var d=0;d<a.length;d++)b(a[d],d,a)&&c.push(a[d]);return c}function g(a,b){var c=0;for(var d=a.length;d>=0;d--){var e=a[d];e=="."?a.splice(d,1):e===".."?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}var h=/^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/;c.resolve=function(){var a="",b=!1;for(var c=arguments.length;c>=-1&&!b;c--){var d=c>=0?arguments[c]:process.cwd();if(typeof d!="string"||!d)continue;a=d+"/"+a,b=d.charAt(0)==="/"}return a=g(f(a.split("/"),function(a){return!!a}),!b).join("/"),(b?"/":"")+a||"."},c.normalize=function(a){var b=a.charAt(0)==="/",c=a.slice(-1)==="/";return a=g(f(a.split("/"),function(a){return!!a}),!b).join("/"),!a&&!b&&(a="."),a&&c&&(a+="/"),(b?"/":"")+a},c.join=function(){var a=Array.prototype.slice.call(arguments,0);return c.normalize(f(a,function(a,b){return a&&typeof a=="string"}).join("/"))},c.dirname=function(a){var b=h.exec(a)[1]||"",c=!1;return b?b.length===1||c&&b.length<=3&&b.charAt(1)===":"?b:b.substring(0,b.length-1):"."},c.basename=function(a,b){var c=h.exec(a)[2]||"";return b&&c.substr(-1*b.length)===b&&(c=c.substr(0,c.length-b.length)),c},c.extname=function(a){return h.exec(a)[3]||""}}),require.define("/haml-coffee.js",function(a,b,c,d,e){((function(){var c,d,e,f,g,h,i,j,k;h=a("./nodes/node"),i=a("./nodes/text"),f=a("./nodes/haml"),c=a("./nodes/code"),d=a("./nodes/comment"),e=a("./nodes/filter"),k=a("./util/text").whitespace,j=a("./util/text").indent,b.exports=g=function(){function a(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;this.options=a!=null?a:{},(i=(b=this.options).escapeHtml)==null&&(b.escapeHtml=!0),(j=(c=this.options).escapeAttributes)==null&&(c.escapeAttributes=!0),(k=(d=this.options).cleanValue)==null&&(d.cleanValue=!0),(l=(e=this.options).uglify)==null&&(e.uglify=!1),(m=(f=this.options).format)==null&&(f.format="html5"),(n=(g=this.options).preserveTags)==null&&(g.preserveTags="pre,textarea"),(o=(h=this.options).selfCloseTags)==null&&(h.selfCloseTags="meta,img,link,br,hr,input,area,param,col,base")}return a.prototype.indentChanged=function(){return this.currentIndent!==this.previousIndent},a.prototype.isIndent=function(){return this.currentIndent>this.previousIndent},a.prototype.updateTabSize=function(){if(this.tabSize===0)return this.tabSize=this.currentIndent-this.previousIndent},a.prototype.updateBlockLevel=function(){this.currentBlockLevel=this.currentIndent/this.tabSize;if(this.currentBlockLevel-Math.floor(this.currentBlockLevel)>0)throw"Indentation error in line "+this.lineNumber;if((this.currentIndent-this.previousIndent)/this.tabSize>1)throw"Block level too deep in line "+this.lineNumber;return this.delta=this.previousBlockLevel-this.currentBlockLevel},a.prototype.updateCodeBlockLevel=function(a){return a instanceof c?this.currentCodeBlockLevel=a.codeBlockLevel+1:this.currentCodeBlockLevel=a.codeBlockLevel},a.prototype.updateParent=function(){return this.isIndent()?this.pushParent():this.popParent()},a.prototype.pushParent=function(){return this.stack.push(this.parentNode),this.parentNode=this.node},a.prototype.popParent=function(){var a,b,c;c=[];for(a=0,b=this.delta-1;0<=b?a<=b:a>=b;0<=b?a++:a--)c.push(this.parentNode=this.stack.pop());return c},a.prototype.getNodeOptions=function(a){return a==null&&(a={}),{parentNode:a.parentNode||this.parentNode,blockLevel:a.blockLevel||this.currentBlockLevel,codeBlockLevel:a.codeBlockLevel||this.currentCodeBlockLevel,escapeHtml:a.escapeHtml||this.options.escapeHtml,escapeAttributes:a.escapeAttributes||this.options.escapeAttributes,cleanValue:a.cleanValue||this.options.cleanValue,format:a.format||this.options.format,preserveTags:a.preserveTags||this.options.preserveTags,selfCloseTags:a.selfCloseTags||this.options.selfCloseTags,uglify:a.uglify||this.options.uglify}},a.prototype.nodeFactory=function(a){var b,g,h;return a==null&&(a=""),g=this.getNodeOptions(),a.match(/^:(escaped|preserve|css|javascript|plain|cdata|coffeescript)/)?b=new e(a,g):a.match(/^(\/|-#)(.*)/)?b=new d(a,g):a.match(/^(-#|-|=|!=|\&=|~)\s*(.*)/)?b=new c(a,g):a.match(/^(%|#|\.|\!)(.*)/)?b=new f(a,g):b=new i(a,g),(h=g.parentNode)!=null&&h.addChild(b),b},a.prototype.parse=function(a){var b,c,d,f,g,j,k,l;a==null&&(a=""),this.line_number=this.previousIndent=this.tabSize=this.currentBlockLevel=this.previousBlockLevel=0,this.currentCodeBlockLevel=this.previousCodeBlockLevel=0,this.node=null,this.stack=[],this.root=this.parentNode=new h("",this.getNodeOptions()),f=a.split("\n");while((d=f.shift())!==void 0){if(this.node instanceof e&&!this.exitFilter)if(/^(\s)*$/.test(d))this.node.addChild(new i("",this.getNodeOptions({parentNode:this.node})));else{g=d.match(/^(\s*)(.*)/),k=g[1],c=g[2];if(this.node.blockLevel>=k.length/2){this.exitFilter=!0,f.unshift(d);continue}j=d.match(RegExp("^\\s{"+(this.node.blockLevel*2+2)+"}(.*)")),j&&this.node.addChild(new i(j[1],this.getNodeOptions({parentNode:this.node})))}else{this.exitFilter=!1,g=d.match(/^(\s*)(.*)/),k=g[1],c=g[2];if(/^(\s)*$/.test(d))continue;while(/^%.*[{(]/.test(c)&&!/^(\s*)[-=&!~.%#<]/.test(f[0])&&/(?:(\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|"\w+[\w:-]*\w?")\s*=\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[\w@.]+)|(:\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|"\w+[\w:-]*\w?")\s*=>\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[-\w@.()\[\]'"]+)|(\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|'\w+[\w:-]*\w?'):\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[-\w@.()\[\]'"]+))/.test(f[0]))b=f.shift(),c+=" "+b.match(/^(\s*)(.*)/)[2],this.line_number++;if(c.match(/(\s)+\|$/)){c=c.replace(/(\s)+\|$/," ");while((l=f[0])!=null?l.match(/(\s)+\|$/):void 0)c+=f.shift().match(/^(\s*)(.*)/)[2].replace(/(\s)+\|$/,""),this.line_number++}this.currentIndent=k.length,this.indentChanged()&&(this.updateTabSize(),this.updateBlockLevel(),this.updateParent(),this.updateCodeBlockLevel(this.parentNode)),this.node=this.nodeFactory(c),this.previousBlockLevel=this.currentBlockLevel,this.previousIndent=this.currentIndent}this.line_number++}return this.evaluate(this.root)},a.prototype.evaluate=function(a){var b,c,d,e;e=a.children;for(c=0,d=e.length;c<d;c++)b=e[c],this.evaluate(b);return a.evaluate()},a.prototype.render=function(a,b){var c,d,e,f,g;b==null&&(b="window.HAML"),e="",d=(""+b+"."+a).replace(/(\s|-)+/g,"_").split(/\./),a=this.options.basename?d.pop():d.pop().split(/\/|\\/).pop(),b=d.shift();if(d.length!==0)for(f=0,g=d.length;f<g;f++)c=d[f],b+="."+c,e+=""+b+" ?= {}\n";else e+=""+b+" ?= {}\n";return e+=""+b+"['"+a+"'] = (context) -> ( ->\n",e+=""+j(this.precompile(),1),e+=").call(context)",e},a.prototype.precompile=function(){var a,b;b="",a=this.createCode(),a.indexOf("$e")!==-1&&(this.options.customHtmlEscape?b+="$e = "+this.options.customHtmlEscape+"\n":b+="$e = (text, escape) ->\n \"#{ text }\"\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/'/g, ''')\n .replace(/\"/g, '"')\n"),a.indexOf("$c")!==-1&&(this.options.customCleanValue?b+="$c = "+this.options.customCleanValue+"\n":b+="$c = (text) -> if text is null or text is undefined then '' else text\n");if(a.indexOf("$p")!==-1||a.indexOf("$fp")!==-1)this.options.customPreserve?b+="$p = "+this.options.customPreserve+"\n":b+="$p = (text) -> text.replace /\\n/g, '
'\n";return a.indexOf("$fp")!==-1&&(this.options.customFindAndPreserve?b+="$fp = "+this.options.customFindAndPreserve+"\n":b+="$fp = (text) ->\n text.replace /<("+this.options.preserveTags.split(",").join("|")+')>([^]*?)<\\/\\1>/g, (str, tag, content) ->\n "<#{ tag }>#{ $p content }</#{ tag }>"\n'),b+="$o = []\n",b+=""+a+"\n",b+='return $o.join("\\n")'+this.cleanupWhitespace(a)+"\n"},a.prototype.createCode=function(){var a,b,c,d,e,f,g,h,i,j;b=[],this.lines=[],i=this.root.children;for(e=0,g=i.length;e<g;e++)a=i[e],this.lines=this.lines.concat(a.render());this.lines=this.combineText(this.lines),j=this.lines;for(f=0,h=j.length;f<h;f++){c=j[f];if(c!==null)switch(c.type){case"text":b.push(""+k(c.cw)+'$o.push "'+k(c.hw)+c.text+'"');break;case"run":b.push(""+k(c.cw)+c.code);break;case"insert":d="",c.findAndPreserve&&(d+="$fp "),c.preserve&&(d+="$p "),c.escape&&(d+="$e "),this.options.cleanValue&&(d+="$c "),b.push(""+k(c.cw)+'$o.push "'+k(c.hw)+'" + '+d+c.code)}}return b.join("\n")},a.prototype.combineText=function(a){var b,c,d;b=[];while((c=a.shift())!==void 0){if(c.type==="text")while(a[0]&&a[0].type==="text"&&c.cw===a[0].cw)d=a.shift(),c.text+="\\n"+k(d.hw)+d.text;b.push(c)}return b},a.prototype.cleanupWhitespace=function(a){return/\u0091|\u0092/.test(a)?".replace(/[\\s\\n]*\\u0091/mg, '').replace(/\\u0092[\\s\\n]*/mg, '')":""},a}()})).call(this)}),require.define("/nodes/node.js",function(a,b,c,d,e){((function(){var c,d;d=a("../util/text").escapeHTML,b.exports=c=function(){function a(a,b){this.expression=a!=null?a:"",b==null&&(b={}),this.parentNode=b.parentNode,this.children=[],this.opener=this.closer=null,this.silent=!1,this.preserveTags=b.preserveTags.split(","),this.preserve=!1,this.wsRemoval={around:!1,inside:!1},this.escapeHtml=b.escapeHtml,this.escapeAttributes=b.escapeAttributes,this.cleanValue=b.cleanValue,this.format=b.format,this.selfCloseTags=b.selfCloseTags.split(","),this.uglify=b.uglify,this.codeBlockLevel=b.codeBlockLevel,this.blockLevel=b.blockLevel}return a.CLEAR_WHITESPACE_LEFT="",a.CLEAR_WHITESPACE_RIGHT="",a.prototype.addChild=function(a){return this.children.push(a),this},a.prototype.getOpener=function(){return this.wsRemoval.around&&this.opener.text&&(this.opener.text=a.CLEAR_WHITESPACE_LEFT+this.opener.text),this.wsRemoval.inside&&this.opener.text&&(this.opener.text+=a.CLEAR_WHITESPACE_RIGHT),this.opener},a.prototype.getCloser=function(){return this.wsRemoval.inside&&this.closer.text&&(this.closer.text=a.CLEAR_WHITESPACE_LEFT+this.closer.text),this.wsRemoval.around&&this.closer.text&&(this.closer.text+=a.CLEAR_WHITESPACE_RIGHT),this.closer},a.prototype.isPreserved=function(){return this.preserve?!0:this.parentNode?this.parentNode.isPreserved():!1},a.prototype.markText=function(a,b){return b==null&&(b=!1),{type:"text",cw:this.codeBlockLevel,hw:this.uglify?0:this.blockLevel-this.codeBlockLevel,text:b?d(a):a}},a.prototype.markRunningCode=function(a){return{type:"run",cw:this.codeBlockLevel,code:a}},a.prototype.markInsertingCode=function(a,b,c,d){return b==null&&(b=!1),c==null&&(c=!1),d==null&&(d=!1),{type:"insert",cw:this.codeBlockLevel,hw:this.uglify?0:this.blockLevel-this.codeBlockLevel,escape:b,preserve:c,findAndPreserve:d,code:a}},a.prototype.evaluate=function(){},a.prototype.render=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;b=[];if(this.silent)return b;if(this.children.length===0)this.opener&&this.closer?(d=this.getOpener(),d.text+=this.getCloser().text,b.push(d)):!this.preserve&&this.isPreserved()?b.push(this.getOpener()):b.push(this.getOpener());else if(this.opener&&this.closer)if(this.preserve){this.wsRemoval.inside=!0,b.push(this.getOpener()),o=this.children;for(e=0,i=o.length;e<i;e++){a=o[e],p=a.render();for(f=0,j=p.length;f<j;f++)c=p[f],c.hw=this.blockLevel,b.push(c)}b.push(this.getCloser())}else{b.push(this.getOpener()),q=this.children;for(g=0,k=q.length;g<k;g++)a=q[g],b=b.concat(a.render());b.push(this.getCloser())}else if(this.opener){b.push(this.getOpener()),r=this.children;for(h=0,l=r.length;h<l;h++)a=r[h],b=b.concat(a.render())}else{s=this.children;for(n=0,m=s.length;n<m;n++)a=s[n],b.push(this.markText(a.render().text))}return b},a}()})).call(this)}),require.define("/util/text.js",function(a,b,c,d,e){b.exports={whitespace:function(a){var b;a*=2,b=[];while(b.length<a)b.push(" ");return b.join("")},escapeQuotes:function(a){return a?a.replace(/"/g,'\\"'):""},escapeHTML:function(a){return a?a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\"/g,"""):""},preserve:function(a){if(a)return a.replace(/<(pre|textarea)>(.*?)<\/\1>/g,function(a){return a.replace("\\n","
")})},indent:function(a,c){return a.replace(/^(.*)$/mg,b.exports.whitespace(c)+"$1")}}}),require.define("/nodes/text.js",function(a,b,c,d,e){((function(){var c,d,e,f=Object.prototype.hasOwnProperty,g=function(a,b){function d(){this.constructor=a}for(var c in b)f.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};c=a("./node"),e=a("../util/text").escapeQuotes,b.exports=d=function(){function a(){a.__super__.constructor.apply(this,arguments)}return g(a,c),a.prototype.evaluate=function(){return this.opener=this.markText(e(this.expression))},a}()})).call(this)}),require.define("/nodes/haml.js",function(a,b,c,d,e){((function(){var c,d,e,f=Object.prototype.hasOwnProperty,g=function(a,b){function d(){this.constructor=a}for(var c in b)f.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=a("./node"),e=a("../util/text").escapeQuotes,b.exports=c=function(){function a(){a.__super__.constructor.apply(this,arguments)}return g(a,d),a.prototype.evaluate=function(){var a,b,c,d,f,g;g=this.parseExpression(this.expression);if(g.doctype)return this.opener=this.markText(""+e(this.buildDocType(g.doctype)));if(this.isNotSelfClosing(g.tag)){f=e(this.buildHtmlTagPrefix(g));if(g.assignment){d=g.assignment.match(/^(=|!=|&=|~)\s*(.*)$/),c=d[1],a=d[2];if(c==="~")b="#{$fp "+a+" }";else if(c==="&="||c==="="&&this.escapeHtml)this.preserve?this.cleanValue?b="#{ $p($e($c("+a+"))) }":b="#{ $p($e("+a+")) }":this.cleanValue?b="#{ $e($c("+a+")) }":b="#{ $e("+a+") }";else if(c==="!="||c==="="&&!this.escapeHtml)this.preserve?this.cleanValue?b="#{ $p($c("+a+")) }":b="#{ $p("+a+") }":this.cleanValue?b="#{ $c("+a+") }":b="#{ "+a+" }";return this.opener=this.markText(""+f+">"+b),this.closer=this.markText("</"+g.tag+">")}return g.text?(this.opener=this.markText(""+f+">"+g.text),this.closer=this.markText("</"+g.tag+">")):(this.opener=this.markText(f+">"),this.closer=this.markText("</"+g.tag+">"))}return g.tag=g.tag.replace(/\/$/,""),f=e(this.buildHtmlTagPrefix(g)),this.opener=this.markText(""+f+(this.format==="xhtml"?" /":"")+">")},a.prototype.parseExpression=function(a){var b,c,d,e,f,g,h,i,j;f=this.parseTag(a),this.preserveTags.indexOf(f.tag)!==-1&&(this.preserve=!0),e=(i=f.ids)!=null?i.pop():void 0,d=f.classes,c=[];if(f.attributes){j=f.attributes;for(g=0,h=j.length;g<h;g++)b=j[g],b.key==="id"?e?e+="_"+b.value:e=b.value:b.key==="class"?(d||(d=[]),d.push(b.value)):c.push(b)}return{doctype:f.doctype,tag:f.tag,id:e,classes:d,text:f.text,attributes:c,assignment:f.assignment}},a.prototype.parseTag=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;try{return e=(n=a.match(/^(\!{3}.*)/))!=null?n[1]:void 0,e?{doctype:e}:(l=a.match(/^((?:[#%\.][a-z0-9_:\-]*[\/]?)+)(?:([\(\{].*[\)\}])?([\<\>]{0,2})(?=[=&!~])(.*)?|([\(\{].*[\)\}])?([\<\>]{0,2}))(.*)?/i),f=l[1],c=l[2]||l[5],m=l[3]||l[6],b=l[4]||l[7],b&&!b.match(/^(=|!=|&=|~)/)&&(k=b.replace(/^ /,""),b=void 0),m&&(m.indexOf(">")!==-1&&(this.wsRemoval.around=!0),m.indexOf("<")!==-1&&(this.wsRemoval.inside=!0,this.preserve=!0)),j=f.match(/\%([a-z_\-][a-z0-9_:\-]*[\/]?)/i),h=f.match(/\#([a-z_\-][a-z0-9_\-]*)/gi),d=f.match(/\.([a-z0-9_\-]*)/gi),{tag:j?j[1]:"div",ids:h?function(){var a,b,c;c=[];for(a=0,b=h.length;a<b;a++)g=h[a],c.push(g.substr(1));return c}():void 0,classes:d?function(){var a,b,c;c=[];for(a=0,b=d.length;a<b;a++)i=d[a],c.push(i.substr(1));return c}():void 0,attributes:this.parseAttributes(c),assignment:b,text:k})}catch(o){throw"Unable to parse tag from "+a+": "+o}},a.prototype.parseAttributes=function(a){var b,c,d,e,f,g,h,i,j;b=[];if(a===void 0)return b;j=this.getDataAttributes(a),a=j[0],d=j[1],e=/(?:(\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|"\w+[\w:-]*\w?")\s*=\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[\w@.]+)|(:\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|"\w+[\w:-]*\w?")\s*=>\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[-\w@.()\[\]'"]+)|(\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|"\w+[\w:-]*\w?"):\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[-\w@.()\[\]'"]+))/g;while(g=e.exec(a)){f=(g[1]||g[3]||g[5]).replace(/^:/,""),i=g[2]||g[4]||g[6],c=!1;if(["false",""].indexOf(i)===-1){["true"].indexOf(i)!==-1?(i="'"+f+"'",c=!0):i.match(/^("|').*\1$/)||(this.escapeAttributes?this.cleanValue?i="'#{ $e($c("+i+")) }'":i="'#{ $e("+i+") }'":this.cleanValue?i="'#{ $c("+i+") }'":i="'#{ ("+i+") }'");if(h=i.match(/^("|')(.*)\1$/))i=h[2];if(h=f.match(/^("|')(.*)\1$/))f=h[2];b.push({key:f,value:i,bool:c})}}return b.concat(d)},a.prototype.getDataAttributes=function(a){var b,c,d,e,f;d=/:?data:?\s*(?:=>\s*)?\{([^}]*)\},?/gi.exec(a);if(d!=null?!d[1]:!void 0)return[a,[]];a=a.replace(d[0],""),c=this.parseAttributes(d[1]);for(e=0,f=c.length;e<f;e++)b=c[e],b.key="data-"+b.key;return[a,c]},a.prototype.buildHtmlTagPrefix=function(a){var b,c,d,e,f,g,h,i,j,k,l;f=["<"+a.tag];if(a.classes){c=a.classes.sort().join(" ");if(a.classes.length>1&&c.match(/#\{/)){c="#{ [",k=a.classes;for(g=0,i=k.length;g<i;g++)e=k[g],(d=e.match(/#{(.*)}/))?c+="("+d[1]+"),":c+="'"+e+"',";c+="].sort().join(' ') }"}f.push("class='"+c+"'")}a.id&&f.push("id='"+a.id+"'");if(a.attributes){l=a.attributes;for(h=0,j=l.length;h<j;h++)b=l[h],b.bool&&this.format==="html5"?f.push(""+b.key):f.push(""+b.key+"="+this.quoteAttributeValue(b.value))}return f.join(" ")},a.prototype.quoteAttributeValue=function(a){var b;return a.indexOf("'")===-1?b="'"+a+"'":b='"'+a+'"',b},a.prototype.buildDocType=function(a){switch(""+this.format+" "+a){case"xhtml !!! XML":return"<?xml version='1.0' encoding='utf-8' ?>";case"xhtml !!!":return'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';case"xhtml !!! 1.1":return'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">';case"xhtml !!! mobile":return'<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">';case"xhtml !!! basic":return'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">';case"xhtml !!! frameset":return'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">';case"xhtml !!! 5":case"html5 !!!":return"<!DOCTYPE html>";case"html5 !!! XML":case"html4 !!! XML":return"";case"html4 !!!":return'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';case"html4 !!! frameset":return'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">';case"html4 !!! strict":return'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">'}},a.prototype.isNotSelfClosing=function(a){return this.selfCloseTags.indexOf(a)===-1&&!a.match(/\/$/)},a}()})).call(this)}),require.define("/nodes/code.js",function(a,b,c,d,e){((function(){var c,d,e=Object.prototype.hasOwnProperty,f=function(a,b){function d(){this.constructor=a}for(var c in b)e.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=a("./node"),b.exports=c=function(){function a(){a.__super__.constructor.apply(this,arguments)}return f(a,d),a.prototype.evaluate=function(){var a,b,c;b=this.expression.match(/(-|!=|\&=|=|~)\s?(.*)?/),c=b[1],a=b[2];if(c==="-"){this.opener=this.markRunningCode(a);if(this.children.length!==0&&this.opener.code.match(/(->|=>)/))return this.closer=this.markRunningCode(" ''")}else{if(c==="~")return this.escapeHtml?this.opener=this.markInsertingCode(a,!0,!1,!0):this.opener=this.markInsertingCode(a,!1,!1,!0);if(c==="&="||c==="="&&this.escapeHtml)return this.opener=this.markInsertingCode(a,!0);if(c==="!="||c==="="&&!this.escapeHtml)return this.opener=this.markInsertingCode(a)}},a}()})).call(this)}),require.define("/nodes/comment.js",function(a,b,c,d,e){((function(){var c,d,e=Object.prototype.hasOwnProperty,f=function(a,b){function d(){this.constructor=a}for(var c in b)e.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=a("./node"),b.exports=c=function(){function a(){a.__super__.constructor.apply(this,arguments)}return f(a,d),a.prototype.evaluate=function(){var a,b,c,d;d=this.expression.match(/(-#|\/\[|\/)\s?(.*)?/),b=d[0],c=d[1],a=d[2];switch(c){case"-#":return this.silent=!0,this.opener=this.markText("");case"/[":return this.opener=this.markText("<!--["+a+">"),this.closer=this.markText("<![endif]-->");case"/":return a?(this.opener=this.markText("<!-- "+a),this.closer=this.markText(" -->")):(this.opener=this.markText("<!--"),this.closer=this.markText("-->"))}},a}()})).call(this)}),require.define("/nodes/filter.js",function(a,b,c,d,e){((function(){var c,d,e,f=Object.prototype.hasOwnProperty,g=function(a,b){function d(){this.constructor=a}for(var c in b)f.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=a("./node"),e=a("../util/text").whitespace,b.exports=c=function(){function a(){a.__super__.constructor.apply(this,arguments)}return g(a,d),a.prototype.evaluate=function(){var a;return this.filter=(a=this.expression.match(/:(escaped|preserve|css|javascript|coffeescript|plain|cdata|coffeescript)(.*)?/))!=null?a[1]:void 0},a.prototype.render=function(){var a,b,c,d,e,f,g,h,i,j;c=[];switch(this.filter){case"escaped":i=this.children;for(e=0,g=i.length;e<g;e++)a=i[e],c.push(this.markText(a.render()[0].text,!0));break;case"preserve":d="",j=this.children;for(f=0,h=j.length;f<h;f++)a=j[f],d+=""+a.render()[0].text+"
";d=d.replace(/\&\#x000A;$/,""),c.push(this.markText(d));break;case"plain":this.renderFilterContent(0,c);break;case"css":this.format==="html5"?c.push(this.markText("<style>")):c.push(this.markText("<style type='text/css'>")),this.format==="xhtml"&&c.push(this.markText(" /*<![CDATA[*/")),b=this.format==="xhtml"?2:1,this.renderFilterContent(b,c),this.format==="xhtml"&&c.push(this.markText(" /*]]>*/")),c.push(this.markText("</style>"));break;case"javascript":this.format==="html5"?c.push(this.markText("<script>")):c.push(this.markText("<script type='text/javascript'>")),this.format==="xhtml"&&c.push(this.markText(" //<![CDATA[")),b=this.format==="xhtml"?2:1,this.renderFilterContent(b,c),this.format==="xhtml"&&c.push(this.markText(" //]]>")),c.push(this.markText("</script>"));break;case"cdata":c.push(this.markText("<![CDATA[")),this.renderFilterContent(2,c),c.push(this.markText("]]>"));break;case"coffeescript":this.renderFilterContent(0,c,"run")}return c},a.prototype.renderFilterContent=function(a,b,c){var d,f,g,h,i,j,k,l,m,n,o;c==null&&(c="text"),f=[],h=0,n=this.children;for(j=0,l=n.length;j<l;j++)d=n[j],f.push(d.render()[0].text);o=[];for(k=0,m=f.length;k<m;k++){i=f[k];if(i==="")o.push(h+=1);else{switch(c){case"text":for(g=0;0<=h?g<h:g>h;0<=h?g++:g--)b.push(this.markText(""));b.push(this.markText(""+e(a)+i));break;case"run":b.push(this.markRunningCode(""+i))}o.push(h=0)}}return o},a}()})).call(this)}) |
@@ -24,2 +24,7 @@ (function() { | ||
describe: 'Set a custom template name' | ||
}).options('b', { | ||
alias: 'basename', | ||
boolean: true, | ||
"default": false, | ||
describe: 'Ignore file path when generate the template name' | ||
}).options('f', { | ||
@@ -81,3 +86,4 @@ alias: 'format', | ||
customFindAndPreserve: argv['custom-find-and-preserve'], | ||
customPreserve: argv['custom-preserve'] | ||
customPreserve: argv['custom-preserve'], | ||
basename: argv['basename'] | ||
}; | ||
@@ -84,0 +90,0 @@ return fs.stat(inputFilename, function(err, stat) { |
@@ -173,3 +173,3 @@ (function() { | ||
if (/^(\s)*$/.test(line)) continue; | ||
while (/^%.*[{(]/.test(expression) && !/^(\s*)[-=~.%#<]/.test(lines[0]) && /(?:(\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|"\w+[\w:-]*\w?")\s*=\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[\w@.]+)|(:\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|"\w+[\w:-]*\w?")\s*=>\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[-\w@.()\[\]'"]+)|(\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|'\w+[\w:-]*\w?'):\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[-\w@.()\[\]'"]+))/.test(lines[0])) { | ||
while (/^%.*[{(]/.test(expression) && !/^(\s*)[-=&!~.%#<]/.test(lines[0]) && /(?:(\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|"\w+[\w:-]*\w?")\s*=\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[\w@.]+)|(:\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|"\w+[\w:-]*\w?")\s*=>\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[-\w@.()\[\]'"]+)|(\w+[\w:-]*\w?|'\w+[\w:-]*\w?'|'\w+[\w:-]*\w?'):\s*("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[-\w@.()\[\]'"]+))/.test(lines[0])) { | ||
attributes = lines.shift(); | ||
@@ -217,3 +217,3 @@ expression += ' ' + attributes.match(/^(\s*)(.*)/)[2]; | ||
segments = ("" + namespace + "." + templateName).replace(/(\s|-)+/g, '_').split(/\./); | ||
templateName = segments.pop(); | ||
templateName = this.options.basename ? segments.pop() : segments.pop().split(/\/|\\/).pop(); | ||
namespace = segments.shift(); | ||
@@ -220,0 +220,0 @@ if (segments.length !== 0) { |
@@ -235,3 +235,3 @@ (function() { | ||
if (interpolation = klass.match(/#{(.*)}/)) { | ||
classes += interpolation[1] + ','; | ||
classes += "(" + interpolation[1] + "),"; | ||
} else { | ||
@@ -238,0 +238,0 @@ classes += "'" + klass + "',"; |
@@ -17,3 +17,3 @@ { | ||
], | ||
"version" : "0.5.3", | ||
"version" : "0.5.4", | ||
"licenses" : [ | ||
@@ -20,0 +20,0 @@ { |
@@ -149,2 +149,3 @@ # Haml Coffee Templates [![Build Status](https://secure.travis-ci.org/9elements/haml-coffee.png)](http://travis-ci.org/9elements/haml-coffee) | ||
-t, --template Set a custom template name | ||
-b, --basename Ignore file path when generate the template name | ||
``` | ||
@@ -212,2 +213,8 @@ | ||
### The `-b`/`--basename` argument | ||
Ignores the path to the template deduce the template name from the template file path. For example, a template named | ||
`user/show-admin.html.haml` will result in a template that can be accessed by `window.HAML['show_admin']` instead of | ||
`window.HAML['user/show_admin']`. | ||
<a name="haml-support" /> | ||
@@ -214,0 +221,0 @@ ## Haml support |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
278223
3332
558