This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contentEval = (source, doc=document)-> | |
source = '(' + source + ')();' if \function == typeof source | |
script = doc.createElement \script | |
script.setAttribute \type, "application/javascript" | |
script.textContent = source | |
doc.body.appendChild script | |
doc.body.removeChild script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{spawn} = require \child_process | |
SHELL = if(\win32 == process.platform) then "cmd /c " else "sh -c " | |
output = (error, stdout, stderr)-> | |
if (error) | |
console.error stderr.trim! | |
else | |
console.log stdout.trim! | |
void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(\jade)filters.coco = (str)-> | |
str = str.replace /\\n/g, '\n' | |
js = require(\coco)compile(str)replace(/\n/g, '\\n') | |
"<script type='text/javascript'>#js</script>" |
NewerOlder