What would a recursive selection tool look like in a pixel editor?
One should be able to draw fractals using it.
| #! /bin/bash | |
| cd templates | |
| for file in *.haml; do | |
| hamlet < $file -r "Hamlet" > ${file/.haml}.js | |
| done | |
| for file in *.js; do | |
| echo "(window.JST || (window.JST = {}))['${file/.js}'] = " > tmpfile |
| var Callable, c, | |
| __slice = [].slice; | |
| Callable = function(invoke) { | |
| var fn; | |
| fn = function() { | |
| var _ref; | |
| return (_ref = fn.invoke).call.apply(_ref, [this].concat(__slice.call(arguments))); | |
| }; | |
| fn.invoke = invoke; |
| Observable.concat = (args...) -> | |
| args = Observable(args) | |
| o = Observable -> | |
| flatten args.map(splat) | |
| o.push = args.push | |
| return o |
| Tab = (name, content) -> | |
| name: name | |
| content: content | |
| tabs = [1..3].map (i) -> | |
| Tab "Tab#{i}", "Hello from tab #{i}" | |
| model = | |
| tabs: tabs | |
| activeTab: Observable tabs[0] |
There are many existing frameworks and libraries in JavaScript that handle data-binding and application abstractions but none of them offer an integrated solution that works with hihger level languages (CoffeeScript, Haml). You could come close with CoffeeScript + hamlc + Knockout or something similar but it would always be a bit of a kludge because they were never designed to work together.
There are three major issues that should be solved in clientside JavaScript applications:
| integrate = (array) -> | |
| total = 0 | |
| array.map (n) -> | |
| total += n | |
| zeros = (array) -> | |
| array.reduce (zeros, n, i) -> | |
| if !(array[i-1] > 0) and n > 0 | |
| zeros.push i |
| #!/bin/bash | |
| set -e | |
| cd component && git pull && cd .. | |
| VERSION=`echo "console.log(require('./package').version)" | node` | |
| script/update_version $VERSION | |
| script/prepublish && script/test && script/standalone |
| YELLOW="\[\033[0;33m\]" | |
| GRAY="\[\033[0;34m\]" | |
| RESET="\033[0;00m" | |
| if [ -z "$COMP_SYM" ]; then | |
| COMP_SYM="♥" | |
| fi | |
| PS1="\n\! \[\`if [[ \$? = "0" ]]; then echo '\e[32m\h\e[0m'; else echo '\e[31m\h\e[0m' ; fi\`\]:\w$YELLOW"'`__git_ps1`'"$GRAY \@$RESET\n$COMP_SYM " |