Skip to content

Commit

Permalink
chore: ship NPM with ES6 modules and UMD bundle (which is referenced …
Browse files Browse the repository at this point in the history
…in package.json)

chore: add test script to package.json
  • Loading branch information
barbatus committed Oct 1, 2016
1 parent ec08c91 commit afd95f1
Show file tree
Hide file tree
Showing 20 changed files with 29 additions and 547 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ script:
# remove unused node modules from cache
- npm prune

sudo: required
sudo: required
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,20 @@ const Tasks = new MongoObservable.Collection<Task>('tasks');
template: `<ul><li *ngFor="let task of tasks | async"></li></ul>`
})
class Tasks {
tasks = Tasks.find();
tasks = Tasks.find().zone();
}

````

### Zone operator

`meteor-rxjs` implements and exposes a special Zone operator for the Angular 2 users' convenience. It might be helpful if one wants to control when UI updates are made. For example, we can improve performance of the above `Tasks` component by debouncing UI updates as follows:
As you can see above we called `zone` method of the cursor observable. This is a special
Zone operator that is implemeted by `meteor-rxjs` for the Angular 2 users' convenience.
This operator runs ngZone each time when new data arrives to the Mongo cursor observable,
thus we force UI updates at the right time using it.

It makes sense to improve performance of the above `Tasks` component by debouncing UI updates.
In this case we are using Zone operator as well:

```ts
Expand All @@ -69,5 +75,3 @@ class List {
}
```


6 changes: 0 additions & 6 deletions dist/MeteorObservable.d.ts

This file was deleted.

94 changes: 0 additions & 94 deletions dist/MeteorObservable.js

This file was deleted.

56 changes: 0 additions & 56 deletions dist/ObservableCollection.d.ts

This file was deleted.

106 changes: 0 additions & 106 deletions dist/ObservableCollection.js

This file was deleted.

23 changes: 0 additions & 23 deletions dist/ObservableCursor.d.ts

This file was deleted.

Loading

0 comments on commit afd95f1

Please sign in to comment.