The Observable Triad
ACTIONS ==> OBSERVABLES ==> REACTIONS
- Concept of reactive-data
- Various decorators to simplify marking properties as observables
const parser = require('@babel/parser'); | |
const traverse = require('@babel/traverse').default; | |
const generator = require('@babel/generator').default; | |
module.exports = function(source) { | |
// Parse to get the AST | |
const ast = parser.parse(source, { | |
sourceType: 'module', | |
plugins: [ | |
'jsx', | |
[ |
const parser = require('@babel/parser'); | |
const traverse = require('@babel/traverse').default; | |
const generator = require('@babel/generator').default; | |
module.exports = function(source) { | |
// Parse to get the AST | |
const ast = parser.parse(source, { | |
sourceType: 'module', | |
plugins: [ | |
'jsx', | |
[ |
value
+ onChange
previous_pwd=$PWD | |
cd $(dirname $0) | |
PROJECT="$HOME/Desktop/project" | |
EXPORT_DIR="$HOME/Desktop/export" | |
rm -rf $EXPORT_DIR | |
mkdir -p $EXPORT_DIR |
### | |
# Simple Script to generate favicons from a base PNG image | |
# Relies on RMagick to do the job | |
# Also includes a Middleman-3.0 extension | |
### | |
require 'fileutils' | |
class MagickFavicon | |
include Magick |
require 'rubygems' | |
require 'nokogiri' | |
require 'date' | |
def newUrl(baseUrl, date, name) | |
"#{baseUrl}/#{date.strftime '%Y/%m'}/#{name}" | |
end | |
def writeMap(items) | |
txtFile = File.open 'urlmap.txt', 'w' |
define -> | |
# The CollectionView class provides a simple view manager for a Backbone Collection. | |
# It listens to changes on the collection and reflects that on the view. It also provides | |
# view filtering, grouping and sorting capabilities. | |
class CollectionView extends Backbone.View | |
initialize: (options)-> | |
throw "collection property must be specified." if not @collection | |
@_ready = $.Deferred() |