moribvndvs / ng2-idle

Responding to idle users in Angular (not AngularJS) applications.
https://moribvndvs.github.io/ng2-idle
Apache License 2.0
315 stars 128 forks source link

Refactor/import of rxjs #49

Closed dpreindl closed 7 years ago

dpreindl commented 7 years ago

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x")

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior? (You can also link to an open issue here) rxjs has been imported using 'import from rxjs/Rx' As explained in latest ng-conf talk (https://www.youtube.com/watch?v=aZRJOVPMW4k) this should be avoided as this not only imports the specified object (e.g. Observable) but everything (all operators, schedulers, ...). Even when using tools like rollup und bundeling with webpack this gets the whole rxjs library into the bundle (even those things which are never needed).

Additional Resources:

What is the new behavior? Imports have been changed to import only things which are required.

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[x] No

Other information:

In the first commit I just changed the imports

The second commit uses a rule from tslint (import-blacklist) - this rule was only added in a newer version of tslint - so I updated tslint dependency. Due to this I also needed to remove some old rules (seems like they are covered by the compiler). Moreover I encountered several tslint errors in different files when running tslint afterwards.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.003%) to 99.339% when pulling f398cb1833b175efb17ec27d52d25943bd12f06d on dpreindl:refactor/import_of_rxjs into e4e6dab5865872dc4661ee93879ca4940ae0b015 on HackedByChinese:master.

moribvndvs commented 7 years ago

Thanks!