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 a719678..a9f8a56 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/ci.yml/badge.svg)](https://github.com/verlok/vanilla-lazyload/actions/workflows/ci.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) @@ -175,17 +176,25 @@ 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). ### 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: @@ -196,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(); @@ -226,7 +237,7 @@ Then include the script. ```html ``` @@ -260,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",