From b4dcf48ed645a7aa6210462d8800c9d6d19a5fda Mon Sep 17 00:00:00 2001 From: Sami Ahmed Siddiqui Date: Tue, 18 Jan 2022 17:34:11 +0500 Subject: [PATCH] Bump to v2.0.0 --- .gitattributes | 11 +++++------ .travis.yml | 2 -- README.md | 15 +++++++++------ appveyor.yml | 4 +--- package-lock.json | 6 +++--- package.json | 6 +++--- runkitExample.js | 37 +++++++++++++++++++++++++++++++++++++ test/runkitExample.js | 37 ------------------------------------- 8 files changed, 58 insertions(+), 60 deletions(-) create mode 100755 runkitExample.js delete mode 100755 test/runkitExample.js diff --git a/.gitattributes b/.gitattributes index 0a125bd..81051ac 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,9 +5,8 @@ *.js text eol=lf # Remove files using `git archive`. -.* export-ignore -appveyor.yml export-ignore -src export-ignore -test/* export-ignore -!test/runkitExample.js export-ignore -tsconfig.json export-ignore +.* export-ignore +appveyor.yml export-ignore +src export-ignore +test export-ignore +tsconfig.json export-ignore diff --git a/.travis.yml b/.travis.yml index abc70ac..ec3886d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,6 @@ branches: dist: xenial language: node_js node_js: - - 8 - - 10 - 12 - 14 - 16 diff --git a/README.md b/README.md index 3d81d55..0155441 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # native-lazy-loading -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Dependency Status][dependency-image]][dependency-url] +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Open Issues][issues-image]][issues-url] [![License][license-image]][license-url] Add the `loading` attribute to completely defer the loading of offscreen images and iframes that can be reached by scrolling: @@ -442,13 +442,16 @@ This package is tested with the `Node.js` and `React` Application. [npm-image]: https://img.shields.io/npm/v/native-lazy-loading.svg [npm-url]: https://www.npmjs.com/package/native-lazy-loading -[downloads-image]: https://img.shields.io/npm/dm/native-lazy-loading.svg +[downloads-image]: https://img.shields.io/npm/dt/native-lazy-loading.svg -[travis-image]: https://img.shields.io/travis/com/samiahmedsiddiqui/native-lazy-loading.svg?label=travis-ci -[travis-url]: https://travis-ci.com/samiahmedsiddiqui/native-lazy-loading +[travis-image]: https://app.travis-ci.com/samiahmedsiddiqui/native-lazy-loading.svg?branch=main +[travis-url]: https://app.travis-ci.com/github/samiahmedsiddiqui/native-lazy-loading [appveyor-url]: https://ci.appveyor.com/project/samiahmedsiddiqui/native-lazy-loading [appveyor-image]: https://img.shields.io/appveyor/ci/samiahmedsiddiqui/native-lazy-loading.svg?label=appveyor -[dependency-image]: https://img.shields.io/david/samiahmedsiddiqui/native-lazy-loading.svg -[dependency-url]: https://david-dm.org/samiahmedsiddiqui/native-lazy-loading +[issues-image]: https://img.shields.io/github/issues/samiahmedsiddiqui/native-lazy-loading +[issues-url]: https://github.com/samiahmedsiddiqui/native-lazy-loading/issues + +[license-image]: https://img.shields.io/github/license/samiahmedsiddiqui/native-lazy-loading +[license-url]: https://github.com/samiahmedsiddiqui/native-lazy-loading/blob/main/LICENSE diff --git a/appveyor.yml b/appveyor.yml index 0a85c1d..0bfa93f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,8 +8,6 @@ branches: environment: matrix: # node.js - - nodejs_version: "8" - - nodejs_version: "10" - nodejs_version: "12" - nodejs_version: "14" - nodejs_version: "16" @@ -17,7 +15,7 @@ environment: install: - ps: Install-Product node $env:nodejs_version - - npm install --dev + - npm install --also=dev test_script: - npm run lint diff --git a/package-lock.json b/package-lock.json index 8edc924..d7d7668 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,19 @@ { "name": "native-lazy-loading", - "version": "1.1.0", + "version": "2.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "native-lazy-loading", - "version": "1.1.0", + "version": "2.0.0", "license": "MIT", "dependencies": { "posthtml-parser": "0.10.2", "posthtml-render": "3.0.0" }, "devDependencies": { - "@types/node": "^17.0.9", + "@types/node": "17.0.9", "@typescript-eslint/eslint-plugin": "5.10.0", "@typescript-eslint/parser": "5.10.0", "eslint": "8.7.0", diff --git a/package.json b/package.json index 7ef87c8..e800d72 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "name": "native-lazy-loading", - "version": "1.1.0", + "version": "2.0.0", "description": "Add the loading attribute to completely defer the loading of offscreen images and iframes.", "main": "index.js", "types": "types/index.d.ts", "files": [ "LICENSE", "index.js", - "test/runkitExample.js", + "runkitExample.js", "types/index.d.ts" ], "scripts": { @@ -38,7 +38,7 @@ "url": "https://github.com/samiahmedsiddiqui/native-lazy-loading/issues" }, "homepage": "https://github.com/samiahmedsiddiqui/native-lazy-loading#readme", - "runkitExampleFilename": "test/runkitExample.js", + "runkitExampleFilename": "runkitExample.js", "dependencies": { "posthtml-parser": "0.10.2", "posthtml-render": "3.0.0" diff --git a/runkitExample.js b/runkitExample.js new file mode 100755 index 0000000..cafecf4 --- /dev/null +++ b/runkitExample.js @@ -0,0 +1,37 @@ +const nativeLazyLoading = require('native-lazy-loading'); +const html = `YAS Global Logo +
+
+
+
+ WordPress Logo +
+
+ Drupal Logo +
+
+ Contentful Logo +
+
+ ContentStack Logo +
+
+ Netlify Logo +
+
+ Heroku Logo +
+
+ Pantheon Logo +
+
+ WPs Engine Logo +
+
+ + +
+
`; + +console.log('Before applying Native Lazy Loading: ', html); +console.log('After applying Native Lazy Loading: ', nativeLazyLoading(html)); diff --git a/test/runkitExample.js b/test/runkitExample.js deleted file mode 100755 index 3700d22..0000000 --- a/test/runkitExample.js +++ /dev/null @@ -1,37 +0,0 @@ -const nativeLazyLoading = require('native-lazy-loading'); -const html = `YAS Global Logo -
-
-
-
- WordPress Logo -
-
- Drupal Logo -
-
- Contentful Logo -
-
- ContentStack Logo -
-
- Netlify Logo -
-
- Heroku Logo -
-
- Pantheon Logo -
-
- WPs Engine Logo -
-
- - -
-
`; - -console.log('Before applying Native Lazy Loading: ', html); -console.log('After applying Native Lazy Loading: ', nativeLazyLoading(html));