From 88ea0eb5f69752342fe57510630e2689c242c77a Mon Sep 17 00:00:00 2001 From: Andrea Verlicchi Date: Fri, 29 Mar 2024 22:03:05 +0100 Subject: [PATCH 1/5] ci badge added --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1fa7d3f..0b75e69 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ LazyLoad is a lightweight (2.4 kB) and flexible script that **speeds up your web [![vanilla-lazyload (latest)](https://img.shields.io/npm/v/vanilla-lazyload/latest.svg)](https://www.npmjs.com/package/vanilla-lazyload) [![vanilla-lazyload (downloads)](https://img.shields.io/npm/dy/vanilla-lazyload.svg)](https://www.npmjs.com/package/vanilla-lazyload) [![](https://data.jsdelivr.com/v1/package/npm/vanilla-lazyload/badge)](https://www.jsdelivr.com/package/npm/vanilla-lazyload) +[![](https://github.com/verlok/vanilla-lazyload/actions/workflows/node.js.yml/badge.svg)](https://github.com/verlok/vanilla-lazyload/actions/workflows/node.js.yml) ➡️ Jump to: [👨‍💻 Getting started - HTML](#-getting-started---html) - [👩‍💻 Getting started - Script](#-getting-started---script) - [🥧 Recipes](#-recipes) - [📺 Demos](#-demos) - [😋 Tips & tricks](#-tips--tricks) - [🔌 API](#-api) - [😯 All features compared](#-all-features-compared) From 61c5b2c8129b0c188331f4fad934fbcc1fc8bdc9 Mon Sep 17 00:00:00 2001 From: Andrea Verlicchi Date: Fri, 29 Mar 2024 22:10:10 +0100 Subject: [PATCH 2/5] ci banner fix --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0b75e69..efc8ea7 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,9 @@ LazyLoad is a lightweight (2.4 kB) and flexible script that **speeds up your web [![vanilla-lazyload (latest)](https://img.shields.io/npm/v/vanilla-lazyload/latest.svg)](https://www.npmjs.com/package/vanilla-lazyload) [![vanilla-lazyload (downloads)](https://img.shields.io/npm/dy/vanilla-lazyload.svg)](https://www.npmjs.com/package/vanilla-lazyload) [![](https://data.jsdelivr.com/v1/package/npm/vanilla-lazyload/badge)](https://www.jsdelivr.com/package/npm/vanilla-lazyload) -[![](https://github.com/verlok/vanilla-lazyload/actions/workflows/node.js.yml/badge.svg)](https://github.com/verlok/vanilla-lazyload/actions/workflows/node.js.yml) +[![](https://github.com/verlok/vanilla-lazyload/actions/workflows/ci.yml/badge.svg)](https://github.com/verlok/vanilla-lazyload/actions/workflows/ci.yml) + +https://github.com/verlok/vanilla-lazyload/actions/workflows/ci.yml/badge.svg ➡️ Jump to: [👨‍💻 Getting started - HTML](#-getting-started---html) - [👩‍💻 Getting started - Script](#-getting-started---script) - [🥧 Recipes](#-recipes) - [📺 Demos](#-demos) - [😋 Tips & tricks](#-tips--tricks) - [🔌 API](#-api) - [😯 All features compared](#-all-features-compared) From 754b94d63a2c35e8617c1465570f10f14f3db777 Mon Sep 17 00:00:00 2001 From: Andrea Verlicchi Date: Fri, 29 Mar 2024 22:11:12 +0100 Subject: [PATCH 3/5] Oops. Line removed. --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index efc8ea7..b8ccefb 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,6 @@ LazyLoad is a lightweight (2.4 kB) and flexible script that **speeds up your web [![](https://data.jsdelivr.com/v1/package/npm/vanilla-lazyload/badge)](https://www.jsdelivr.com/package/npm/vanilla-lazyload) [![](https://github.com/verlok/vanilla-lazyload/actions/workflows/ci.yml/badge.svg)](https://github.com/verlok/vanilla-lazyload/actions/workflows/ci.yml) -https://github.com/verlok/vanilla-lazyload/actions/workflows/ci.yml/badge.svg - ➡️ Jump to: [👨‍💻 Getting started - HTML](#-getting-started---html) - [👩‍💻 Getting started - Script](#-getting-started---script) - [🥧 Recipes](#-recipes) - [📺 Demos](#-demos) - [😋 Tips & tricks](#-tips--tricks) - [🔌 API](#-api) - [😯 All features compared](#-all-features-compared) --- From 5c1d024cd6eee410b3b3682e428c5c47d4e8989a Mon Sep 17 00:00:00 2001 From: Andrea Verlicchi Date: Fri, 29 Mar 2024 22:16:47 +0100 Subject: [PATCH 4/5] Added a way to import it as an ESM module from jsdelivr. Closes #546 --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b8ccefb..a5fa916 100644 --- a/README.md +++ b/README.md @@ -183,12 +183,20 @@ Quickly understand how to upgrade from a previous version reading the [practical ### The simple, easiest way -The easiest way to use LazyLoad is to include the script from a CDN: +The easiest way to use LazyLoad is to include the script from a CDN. ```html ``` +OR, if you prefer to import it as an ES module: + +```html + +``` + Then, in your javascript code: ```js @@ -197,7 +205,9 @@ var lazyLoadInstance = new LazyLoad({ }); ``` -To be sure that DOM for your lazy content is ready when you instantiate LazyLoad, **place the script tag right before the closing `` tag**. If more DOM arrives later, e.g. via an AJAX call, you'll need to call `lazyLoadInstance.update();` to make LazyLoad check the DOM again. +To be sure that DOM for your lazy content is ready when you instantiate LazyLoad, **place the script tag right before the closing `` tag**. + +If more DOM arrives later, e.g. via an AJAX call, you'll need to call `lazyLoadInstance.update();` to make LazyLoad check the DOM again. ```js lazyLoadInstance.update(); From 06b49d90dfd45a0752515b74da1babeb5a41743a Mon Sep 17 00:00:00 2001 From: Andrea Verlicchi Date: Sat, 30 Mar 2024 09:04:16 +0100 Subject: [PATCH 5/5] Releasing 19.0.5 --- CHANGELOG.md | 4 ++++ README.md | 8 ++++---- package-lock.json | 4 ++-- package.json | 10 ++-------- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8025ef..53df447 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Version 19 +#### 19.0.5 + +- Removed `.eslintrc.json`, `LICENSE`, `CHANGELOG.md`, `CODE_OF_CONDUCT.md`, `README.md`, `package.json` from the package files, as they didn't have any impact on [code quality](https://docs.npmjs.com/searching-for-and-choosing-packages-to-download#quality). + #### 19.0.4 - Removed Babel plugin to polyfill `Object.assign()`, as suggested in #611. diff --git a/README.md b/README.md index 02a9df7..a9f8a56 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,7 @@ Please note that the video poster can be lazily loaded too. ## 👩‍💻 Getting started - Script -The latest, recommended version of LazyLoad is **19.0.4**. +The latest, recommended version of LazyLoad is **19.0.5**. Note that if you need to support Internet Explorer 11, you need to use version 17.9.0 or below. Quickly understand how to upgrade from a previous version reading the [practical upgrade guide](UPGRADE.md). @@ -186,7 +186,7 @@ Quickly understand how to upgrade from a previous version reading the [practical The easiest way to use LazyLoad is to include the script from a CDN. ```html - + ``` OR, if you prefer to import it as an ES module: @@ -237,7 +237,7 @@ Then include the script. ```html ``` @@ -271,7 +271,7 @@ Then include the script. ```html ``` diff --git a/package-lock.json b/package-lock.json index 4a08b0b..e680271 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "vanilla-lazyload", - "version": "19.0.4", + "version": "19.0.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "vanilla-lazyload", - "version": "19.0.4", + "version": "19.0.5", "license": "MIT", "devDependencies": { "@babel/core": "^7.24.3", diff --git a/package.json b/package.json index 8c27963..9794224 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vanilla-lazyload", - "version": "19.0.4", + "version": "19.0.5", "description": "LazyLoad is a lightweight (2.4 kB) and flexible script that speeds up your web application by deferring the loading of your below-the-fold images, videos and iframes to when they will enter the viewport. It's written in plain \"vanilla\" JavaScript, it leverages the IntersectionObserver API, it supports responsive images, it optimizes your website for slower connections, and can enable native lazy loading.", "main": "dist/lazyload.min.js", "module": "dist/esm/lazyload.js", @@ -25,13 +25,7 @@ }, "files": [ "dist", - "typings", - ".eslintrc.json", - "LICENSE", - "CHANGELOG.md", - "CODE_OF_CONDUCT.md", - "README.md", - "package.json" + "typings" ], "repository": { "type": "git",