made with esnextbin
Last active
March 22, 2016 20:06
-
-
Save TylorS/25cd8aef0458e8b78ba8 to your computer and use it in GitHub Desktop.
esnextbin sketch
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>ESNextbin Sketch</title> | |
<!-- put additional styles and scripts here --> | |
</head> | |
<body> | |
<!-- put markup and other contents here --> | |
</body> | |
</html> |
This file contains hidden or 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
import {Observable} from 'rx' | |
import {mockDOMSource} from 'cycle-snabbdom' | |
const DOMSource = | |
mockDOMSource({ | |
':root': Observable.of('Hello'), | |
'.container': Observable.of('Hello'), | |
}) | |
DOMSource | |
.select(':root') | |
.observable | |
.subscribe(console.log.bind(console)) |
This file contains hidden or 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
{ | |
"name": "esnextbin-sketch", | |
"version": "0.0.0", | |
"dependencies": { | |
"rx": "4.1.0", | |
"cycle-snabbdom": "1.2.0" | |
} | |
} |
This file contains hidden or 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
'use strict'; | |
var _rx = require('rx'); | |
var _cycleSnabbdom = require('cycle-snabbdom'); | |
var DOMSource = (0, _cycleSnabbdom.mockDOMSource)({ | |
':root': _rx.Observable.of('Hello'), | |
'.container': _rx.Observable.of('Hello') | |
}); | |
DOMSource.select(':root').observable.subscribe(console.log.bind(console)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment