Skip to content

Commit 83b9d7c

Browse files
committed
Convert to using TS, ESM, eslint, vitest, prettier
also, refactor the API to be more consistent and predictable, and to better match existing patterns, e.g.: • the removeEventListener/cleanup function is returned by invoking onscrolling(), rather than being invoked as onscrolling.remove() • the event payload is now a consistent { scrollX: number; scrollY: number } object • onscrolling now has only a single function signature, and the scroll direction is specified via an optional options object as the 2nd argument (defaults to 'vertical')
1 parent 570b3a0 commit 83b9d7c

20 files changed

+3217
-1856
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ pids
1010
# Directory for instrumented libs generated by jscoverage/JSCover
1111
lib-cov
1212

13+
# Build
14+
dist
15+
1316
# Coverage directory used by tools like istanbul
1417
coverage
1518

16-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17-
.grunt
18-
1919
# Compiled binary addons (http://nodejs.org/api/addons.html)
2020
build/Release
2121

.jshintrc

Lines changed: 0 additions & 21 deletions
This file was deleted.

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

.travis.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,12 @@ Tests use Mocha + Should.js + Sinon. Using `npm test` will run the tests in head
5454

5555
## TODO
5656

57-
- [ ] Add optional param to specify an object other than `window` to monitor for scroll events
58-
- [ ] Expose `measure` and `mutate` functions to attach handlers specifically to the measuring (read) or mutating (write) portion of each cycle to minimize layout calculations
57+
- [ ] Add optional param to specify an object other than `window` to monitor for scroll events
58+
- [ ] Expose `measure` and `mutate` functions to attach handlers specifically to the measuring (read) or mutating (write) portion of each cycle to minimize layout calculations
5959

6060
## Misc
6161

62-
*Note: This package was formerly known as [jank-free-onscroll][]*
63-
62+
_Note: This package was formerly known as [jank-free-onscroll][]_
6463

6564
[html5rocks-tutorial]: http://www.html5rocks.com/en/tutorials/speed/animations/#debouncing-scroll-events
6665
[raf-caniuse]: http://caniuse.com/#feat=requestanimationframe

bower.json

Lines changed: 0 additions & 32 deletions
This file was deleted.

dist/onscrolling.js

Lines changed: 0 additions & 206 deletions
This file was deleted.

0 commit comments

Comments
 (0)