Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Oscar Lodriguez (OSV) committed Jul 21, 2020
1 parent d1bc98a commit 68b58fe
Show file tree
Hide file tree
Showing 10 changed files with 3,853 additions and 3,486 deletions.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

Use this playground to quickly scaffold a rxjs program that includes marble testing for scratchpad purposes

# Usage
## Usage

```bash
$ npm start
npm start
```

# TDD
## TDD

```bash
$ npm test
npm test
```

Project will start on the specified port with watch mode, enjoy!
10 changes: 5 additions & 5 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import { scan } from "rxjs/operators/";

const source = interval(2000);

const sourceMessage = x => `rxjs logo spun ${x} times`;
const messageElement = document.querySelector(".message");
const sourceMessage = x => `rxjs logo spun ${ x } times`;
const messageElement = document.querySelector('.message');

const print = x => (messageElement.textContent = x);
const log = x => (messageElement.textContent = x);

source
.pipe(scan((rotation, count) => count + 1, 0))
.subscribe(x => print(sourceMessage(x)));
.pipe(scan((_, count) => count + 1, 0))
.subscribe(message => log(sourceMessage(message)));
6,594 changes: 3,817 additions & 2,777 deletions package-lock.json

Large diffs are not rendered by default.

38 changes: 23 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,37 @@
"node": ">= 0.10.26",
"npm": ">=1.4.3"
},
"husky": {
"hooks": {
"pre-commit": "npm test"
}
},
"scripts": {
"prestart": "npm i && webpack",
"prestart": "npm i",
"start": "webpack-dev-server",
"test": "jest --watch"
"test": "jest",
"test:watch": "jest --watch"
},
"devDependencies": {
"@types/jest": "^25.1.4",
"@types/rx": "^4.1.1",
"@types/jest": "^25.2.3",
"@types/rx": "^4.1.2",
"copy-webpack-plugin": "^5.1.1",
"css-loader": "^3.4.2",
"css-loader": "^3.6.0",
"file-loader": "^5.1.0",
"html-loader": "^1.1.0",
"html-webpack-plugin": "^3.2.0",
"jest": "^25.1.0",
"rxjs-marbles": "^5.0.4",
"style-loader": "^1.1.3",
"ts-jest": "^25.2.1",
"ts-loader": "^6.2.1",
"typescript": "^3.8.3",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.10.3"
"husky": "^4.2.5",
"jest": "^25.5.4",
"rxjs-marbles": "^5.0.6",
"style-loader": "^1.2.1",
"ts-jest": "^25.5.1",
"ts-loader": "^6.2.2",
"typescript": "^3.9.7",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0"
},
"dependencies": {
"rxjs": "^6.5.4"
"rxjs": "^6.6.0"
}
}
5 changes: 0 additions & 5 deletions typings.json

This file was deleted.

Loading

0 comments on commit 68b58fe

Please sign in to comment.