Skip to content

Commit

Permalink
Update packages (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
FeliciousX authored and jvanbruegge committed Dec 4, 2018
1 parent dca0d0d commit 492bf22
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
25 changes: 14 additions & 11 deletions examples/rxjs/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Stream } from 'xstream';
import { Observable } from 'rxjs';
import { run } from '@cycle/rxjs-run';
import { button, div, span, makeDOMDriver, DOMSource, VNode } from '@cycle/dom';
import { Observable, of as observableOf } from 'rxjs';
import { mapTo } from 'rxjs/operators';
import { button, div, span, makeDOMDriver, VNode } from '@cycle/dom';
import { DOMSource } from '@cycle/dom/lib/cjs/rxjs';
import isolate from '@cycle/isolate';

import { modalify, ModalAction } from '../../../src/modalify';
Expand All @@ -12,32 +13,34 @@ interface Sources {

interface Sinks {
DOM?: Observable<VNode>;
modal?: Stream<ModalAction>;
modal?: Observable<ModalAction>;
}

function main({ DOM }: Sources): Sinks {
return {
DOM: Observable.of(button('.button', ['open modal'])),
DOM: observableOf(button('.button', ['open modal'])),
modal: DOM.select('.button')
.events('click')
.mapTo({
type: 'open',
component: isolate(modal)
} as ModalAction)
.pipe(
mapTo({
type: 'open',
component: isolate(modal)
} as ModalAction)
)
};
}

function modal({ DOM }: Sources): Sinks {
return {
DOM: Observable.of(
DOM: observableOf(
div('.div', [
span('.span', ['This is an rxjs modal! :)']),
button('.button', ['close'])
])
),
modal: DOM.select('.button')
.events('click')
.mapTo({ type: 'close' } as ModalAction)
.pipe(mapTo({ type: 'close' } as ModalAction))
};
}

Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
},
"homepage": "https://github.com/cyclejs-community/cyclejs-modal#readme",
"dependencies": {
"@cycle/dom": "^21.1.0",
"@cycle/isolate": "^3.4.0",
"@cycle/run": "^4.4.0",
"@cycle/dom": "^22.0.0",
"@cycle/isolate": "^4.1.0",
"@cycle/run": "^5.1.0",
"cyclejs-utils": "^3.2.0",
"xstream": "^11.7.0"
},
"devDependencies": {
"@cycle/rxjs-run": "^9.3.0",
"@cycle/rxjs-run": "^10.1.0",
"babel-preset-env": "^1.7.0",
"babelify": "^10.0.0",
"browserify": "^16.2.2",
Expand All @@ -62,8 +62,8 @@
"prettier": "^1.14.3",
"release-it": "^7.6.1",
"rimraf": "^2.6.2",
"rxjs": "^5.5.12",
"rxjs": "^6.3.3",
"typedoc": "^0.12.0",
"typescript": "^2.8.4"
"typescript": "^3.1.6"
}
}

0 comments on commit 492bf22

Please sign in to comment.