Skip to content

Commit

Permalink
Convert to using TS, ESM, eslint, vitest, prettier
Browse files Browse the repository at this point in the history
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')
  • Loading branch information
acusti committed Jun 15, 2024
1 parent 570b3a0 commit 3343aca
Show file tree
Hide file tree
Showing 20 changed files with 3,239 additions and 1,856 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ pids
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Build
dist

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

Expand Down
21 changes: 0 additions & 21 deletions .jshintrc

This file was deleted.

2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,12 @@ Tests use Mocha + Should.js + Sinon. Using `npm test` will run the tests in head

## TODO

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

## Misc

*Note: This package was formerly known as [jank-free-onscroll][]*

_Note: This package was formerly known as [jank-free-onscroll][]_

[html5rocks-tutorial]: http://www.html5rocks.com/en/tutorials/speed/animations/#debouncing-scroll-events
[raf-caniuse]: http://caniuse.com/#feat=requestanimationframe
Expand Down
32 changes: 0 additions & 32 deletions bower.json

This file was deleted.

206 changes: 0 additions & 206 deletions dist/onscrolling.js

This file was deleted.

Loading

0 comments on commit 3343aca

Please sign in to comment.