Skip to content

Commit

Permalink
For v3.4.0 (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
shinsenter authored Sep 7, 2022
1 parent 16692e3 commit 0df8ae6
Show file tree
Hide file tree
Showing 15 changed files with 511 additions and 462 deletions.
2 changes: 1 addition & 1 deletion .build/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"guard-for-in": "error",
"handle-callback-err": "error",
"id-blacklist": "error",
"id-length": "error",
"id-length": "off",
"id-match": "error",
"implicit-arrow-linebreak": "error",
"indent": ["error", 2],
Expand Down
12 changes: 7 additions & 5 deletions .build/.minify
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"parse": {},
"mangle": {
"reserved": ["log", "debug"]
"reserved": ["log", "debug", "perf_begin", "perf_end"]
},
"compress": {
"drop_console": true,
"passes": 5,
"hoist_funs": true,
"passes": 10,
"pure_getters": true,
"pure_funcs": ["log", "debug"]
"pure_funcs": ["log", "debug", "perf_begin", "perf_end"],
"reduce_funcs": true
},
"output": {
"comments": "/^!/",
Expand All @@ -21,7 +23,7 @@
"nameCache": null,
"sourceMap": false,
"toplevel": false,
"v8": false,
"v8": true,
"warnings": false,
"webkit": false
"webkit": true
}
141 changes: 70 additions & 71 deletions README.md

Large diffs are not rendered by default.

107 changes: 53 additions & 54 deletions demo/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/defer.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/defer_plus.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/polyfill.min.js

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions docs/about.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package @shinsenter/defer.js

🥇 A JavaScript micro-library that helps you lazy load (almost) anything. It's zero-dependency, super-efficient, and Web Vitals friendly.
🥇 A JavaScript micro-library that helps you lazy load (almost) anything. Defer.js is zero-dependency, super-efficient, and Web Vitals friendly.

[![NPM](https://img.shields.io/npm/l/@shinsenter/defer.js)](https://code.shin.company/defer.js/blob/master/LICENSE)
[![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@shinsenter/defer.js)](https://snyk.io/advisor/npm-package/@shinsenter/defer.js)
Expand All @@ -16,7 +16,7 @@
[![NPM](https://nodei.co/npm/@shinsenter/defer.js.png?downloads=true)](https://www.npmjs.com/package/@shinsenter/defer.js)

- **Package**: [@shinsenter/defer.js](https://www.npmjs.com/package/@shinsenter/defer.js)
- **Version**: 3.3.0
- **Version**: 3.4.0
- **Author**: Mai Nhut Tan <[email protected]>
- **Copyright**: 2022 AppSeeds <https://code.shin.company/>
- **License**: [MIT](https://code.shin.company/defer.js/blob/master/LICENSE)
Expand Down Expand Up @@ -80,7 +80,7 @@ Just put a `<script>` tag pointing to the library URL just below the opening `<h
<title>My Awesome Page</title>

<!-- Put defer.min.js here -->
<script src="https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@3.3.0/dist/defer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@3.4.0/dist/defer.min.js"></script>

<!-- ... -->
</head>
Expand All @@ -96,7 +96,7 @@ Because `defer.min.js` is optimized to a very tiny file size, you can even inlin
<title>My Awesome Page</title>

<!-- Copy the script from the below URL -->
<!-- https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@3.3.0/dist/defer.min.js -->
<!-- https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@3.4.0/dist/defer.min.js -->
<script>/* then replace this comment block with the content of defer.min.js */</script>

<!-- ... -->
Expand All @@ -114,7 +114,7 @@ just use `defer_plus.min.js` instead of `defer.min.js`.
<title>My Awesome Page</title>

<!-- Put defer_plus.min.js here -->
<script src="https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@3.3.0/dist/defer_plus.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@3.4.0/dist/defer_plus.min.js"></script>

<!-- ... -->
</head>
Expand All @@ -131,8 +131,8 @@ right after the `defer.min.js` script tag as the following example:
<script>/* the content of defer.min.js */</script>

<!-- If legacy browsers like Internet Explorer 9 still need to be supported -->
<!-- Please put IntersectionObserver polyfill right after defer.js script tag -->
<script>'IntersectionObserver'in window||document.write('<script src="https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@3.3.0/dist/polyfill.min.js"><\/script>');</script>
<!-- Please put IntersectionObserver polyfill right after the Defer.js script tag -->
<script>'IntersectionObserver'in window||document.write('<script src="https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@3.4.0/dist/polyfill.min.js"><\/script>');</script>
```

*HINT*: Modern browsers support `IntersectionObserver` feature,
Expand Down
Loading

0 comments on commit 0df8ae6

Please sign in to comment.