Giter VIP home page Giter VIP logo

learning-rxjs's Introduction

learning-rxjs

Financial Contributors on Open Collective Greenkeeper badge

Learning RxJS step by step

  1. Clone this repo
  2. Checkout to seed branch
  3. Implement the Application follow the article

使用 yarn 来保证项目可以正常运行

更新计划

  • 使用最新版 RxJSTypeScript 升级已有代码
  • 增加 React 与 Vue 中使用 RxJS 最佳实践系列文章
  • 随使用的工具升级,长期维护文章与源码

支持更新计划: https://opencollective.com/learning-rxjs

Articles

Buy me a cup of coffee

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

learning-rxjs's People

Contributors

brooooooklyn avatar f48vj avatar greenkeeper[bot] avatar jayphelps avatar swizardlv avatar zjhiphop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

learning-rxjs's Issues

build error: Cannot find type definition file for 'chai'

  • windows 7
  • node 4.x
  • branch artic1 》 learn1
    运行 npm start build 的时候报错 Cannot find type definition file for 'chai'
    添加依赖 就好了。
"@types/chai": "^3.4.34"

这个不知道 是不是我这边的问题。

Module not found when executing the command "ts-node example/switchMap.ts"

When I tried to execute the command below:

npm i -g ts-node && ts-node example/switchMap.ts

to see the execution result of switchMap, I had this error:

Error: Cannot find module 'typescript'   
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at load (/usr/lib/node_modules/ts-node/src/index.ts:184:27)
    at service (/usr/lib/node_modules/ts-node/src/index.ts:363:32)
    at Object.register (/usr/lib/node_modules/ts-node/src/index.ts:372:5)
    at Object.<anonymous> (/usr/lib/node_modules/ts-node/src/_bin.ts:147:17)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

Is there something I missed to install?

An in-range update of @types/koa is breaking the build 🚨

The devDependency @types/koa was updated from 2.0.46 to 2.0.47.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/koa is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

npm包版本低, 运行起来报错

peerDependencies WARNING webpack-dev-server@^3.0.0 requires a peer of webpack@^4.0.0-beta.1 but [email protected] was installed
peerDependencies WARNING [email protected][email protected] requires a peer of webpack@^4.0.0 but [email protected] was installed

The CLI moved into a separate package: webpack-cli.
Please install 'webpack-cli' in addition to webpack itself to use the CLI.
-> When using npm: npm install webpack-cli -D
-> When using yarn: yarn add webpack-cli -D
module.js:538
    throw err;
    ^

Error: Cannot find module 'webpack-cli/bin/config-yargs'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)

升级版本之后webpack配置也要修改

An in-range update of @types/koa-router is breaking the build 🚨

The devDependency @types/koa-router was updated from 7.0.35 to 7.0.36.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/koa-router is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

npm start 缺少包

我checkout了master分支,npm install ,然后checkout seed分支,又执行了npm install ,npm start 还是提示有些module没有,试图安装了几个,还是有问题。麻烦你看一下是不是把所有的依赖都写进去了。或者,update一下readme

An in-range update of nodemon is breaking the build 🚨

The devDependency nodemon was updated from 1.18.5 to 1.18.6.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

nodemon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).

Release Notes for v1.18.6

1.18.6 (2018-11-05)

Bug Fixes

Commits

The new version differs by 1 commits.

  • 521eb1e fix: restart on change for non-default signals (#1409) (#1430)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Question on `.filter(e => e.target === $todoItem)`

I have a question in the codes below which generates the stream of the click on the items. What .filter(e => e.target === $todoItem) is for?

When I commented that line, the toggle works too.

const toggle$ = item$.mergeMap($todoItem => {
  return Observable.fromEvent<MouseEvent>($todoItem, 'click')
    // Can I comment this line? 
    // .filter(e => e.target === $todoItem)
    .mapTo($todoItem)
})
  .do(($todoItem: HTMLElement) => {
    if ($todoItem.classList.contains('done')) {
      $todoItem.classList.remove('done')
    } else {
      $todoItem.classList.add('done')
    }
  })

The same question in the codes of generating the stream of add.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

npm start error

win10
npm 3.8.9
node v6.2.0
我切换分支后,再npm start报错,要怎么解决?

sanzhs@DESKTOP-TB810EH MINGW32 /e/RxJS/learning-rxjs (master)
$ git checkout seed
Branch seed set up to track remote branch seed from origin.
Switched to a new branch 'seed'

sanzhs@DESKTOP-TB810EH MINGW32 /e/RxJS/learning-rxjs (seed)
$ npm start

[email protected] start E:\RxJS\learning-rxjs
webpack-dev-server --inline --colors --progress --display-error-details --display-cached --port 3000 --content-base src

'webpack-dev-server' ▒▒▒▒▒ڲ▒▒▒▒ⲿ▒▒▒Ҳ▒▒▒ǿ▒▒▒▒еij▒▒▒
▒▒▒▒▒▒▒▒▒ļ▒▒▒

npm ERR! Windows_NT 10.0.10240
npm ERR! argv "E:\nodejs\node.exe" "E:\nodejs\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v6.2.0
npm ERR! npm v3.8.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: webpack-dev-server --inline --colors --progress --display-error-details --display-cached --port 3000 --content-base src
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'webpack-dev-server --inline --colors --progress --display-error-details --display-cached --port 3000 --content-base src'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the rxjs-todomvc package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server --inline --colors --progress --display-error-details --display-cached --port 3000 --content-base src
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs rxjs-todomvc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls rxjs-todomvc
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! Please include the following file with any support request:
npm ERR! E:\RxJS\learning-rxjs\npm-debug.log

sanzhs@DESKTOP-TB810EH MINGW32 /e/RxJS/learning-rxjs (seed)

================
还有个小白问题,刚接触TypeScript和RxJS,不是很熟悉。
按官网的npm install rxjs-es安装后,自己编了hello.ts文件,内容如下:
import Rx from 'rxjs/Rx';

Rx.Observable.of(1,2,3)
.map(x => console.log(x));

tsc hello.ts编译之后生成hello.js,放在html的<script>里测试显示找不到这个依赖

Uncaught ReferenceError: require is not defined
at greeter.js:2

这个要怎么解决,是要在特定目录下写ts文件吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.