Anton Shestakov <av6@dwimlabs.net>, Wed, 01 Nov 2017 00:50:57 +0800
Makefile: use file targets more, results in incremental building
Less work to do when only some files get changed, but more work when building
from scratch. But, multiple compilers can run in parallel.
coffee/rivets.coffee
Permissions: -rw-r--r--
observe: (obj, keypath, callback) -> obj.on('change:' + keypath, callback) unobserve: (obj, keypath, callback) -> obj.off('change:' + keypath, callback) set: (obj, keypath, value) -> rivets.binders['style-*'] = (el, value) -> el.style[@args[0]] = value ? '' rivets.formatters['first-letter'] = (value) -> rivets.formatters['dumb-hash'] = (value) -> for i in [0...value.length] result += value.charCodeAt(i) rivets.formatters['fn'] = (value, fn) -> rivets.formatters['only'] = (value, allowed...) -> if value in allowed then value else '' rivets.formatters['eq'] = (a, b) -> rivets.formatters['has'] = (a, b) -> rivets.formatters['format-date'] = (value, format) -> if value? then value.format(format) else '' rivets.formatters['iso-date'] = (value) -> if value? then value.toISOString() else '' rivets.formatters['from-now'] = (value) -> if value? then value.fromNow() else '' rivets.formatters['percent'] = (value) ->