smooth-loader 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.dockerignore CHANGED
@@ -1,3 +1,8 @@
1
1
  node_modules
2
2
  .vscode
3
3
  .git
4
+ .github
5
+ .gitignore
6
+ .prettierrc
7
+ LICENSE
8
+ *.md
@@ -1,3 +1,7 @@
1
+ name: Publish package to NPM
2
+
3
+ # Good article: https://medium.com/@codewithwaheed/publish-your-first-package-using-npm-and-github-actions-e453ca9f9fd2
4
+
1
5
  on:
2
6
  push:
3
7
  branches: master
package/CHANGELOG.md CHANGED
@@ -1,44 +1,51 @@
1
1
  # Release Notes
2
2
 
3
+ ## v1.2.2 (2025-11-30)
4
+ - Upgraded TypeScript to the latest version.
5
+ - Updated `README.md` file by adding more info.
6
+
7
+ ## v1.2.1 (2025-06-29)
8
+ - Removed not needed lines from Dockerfile and docker-compose.yml.
9
+
3
10
  ## v1.2.0 (2025-06-29)
4
- - Added Docker support to the project
11
+ - Added container engines support like Podman and Docker to the project.
5
12
 
6
13
  ## v1.1.4 (2024-04-08)
7
- - Formatted the `CHANGELOG.md` file
8
- - Refactored the code to make it more readable
9
- - Improved error handling
14
+ - Formatted the `CHANGELOG.md` file.
15
+ - Refactored the code to make it more readable.
16
+ - Improved error handling.
10
17
 
11
18
  ## v1.1.3 (2023-11-19)
12
- - Changed the `README.MD` file
19
+ - Changed the `README.MD` file.
13
20
 
14
21
  ## v1.1.2 (2022-12-04)
15
- - Removed line from docs
22
+ - Removed line from docs.
16
23
 
17
24
  ## v1.1.1 (2022-12-04)
18
- - Code refactoring
19
- - Added ability to provide array of images instead of only NodeListOf
20
- - Improved documentation in `README.md`
25
+ - Code refactoring.
26
+ - Added ability to provide array of images instead of only `NodeListOf`.
27
+ - Improved documentation in `README.md`.
21
28
 
22
29
  ## v1.1.0 (2022-12-01)
23
- - Moved from beta version
30
+ - Moved from beta version.
24
31
 
25
32
  ## v1.1.0-beta.2 (2022-11-30)
26
- - Code refactoring
27
- - Manual testing
33
+ - Code refactoring.
34
+ - Manual testing.
28
35
 
29
36
  ## v1.1.0-beta.1 (2022-11-29)
30
- - Removed blur from small placeholder images if they are set with `src` attribute
31
- - Added more info to docs
37
+ - Removed blur from small placeholder images if they are set with `src` attribute.
38
+ - Added more info to docs.
32
39
 
33
40
  ## v1.1.0-beta.0 (2022-11-29)
34
- - Added missing information to the README.md file
35
- - Added ability to show small images as placeholder, so you don't look at empty screen but blurred mini version of the image
41
+ - Added missing information to the `README.md` file.
42
+ - Added ability to show small images as placeholder, so you don't look at empty screen but blurred mini version of the image.
36
43
 
37
44
  ## v1.0.7 (2022-06-22)
38
- - Fixed appearing transition with background images. Now it works
39
- - Improved documentation `README.md` file
40
- - Added **configurations** for smooth loading images
45
+ - Fixed appearing transition with background images. Now it works.
46
+ - Improved documentation `README.md` file.
47
+ - Added **configurations** for smooth loading images.
41
48
 
42
49
  ## v1.0.6 (2022-01-02)
43
- - Changed default images selector to be more specific
44
- - Added `CHANGELOG.md` file
50
+ - Changed default images selector to be more specific.
51
+ - Added `CHANGELOG.md` file.
package/Containerfile ADDED
@@ -0,0 +1,10 @@
1
+ FROM node:24-alpine
2
+
3
+ WORKDIR /app
4
+
5
+ COPY package*.json .
6
+
7
+ RUN npm install && \
8
+ npm cache clean --force
9
+
10
+ COPY . .
package/README.md CHANGED
@@ -6,36 +6,34 @@ This package is a MUST-HAVE for every website containing multiple images on the
6
6
 
7
7
  ## Follow the [official documentation](https://smooth-loader.github.io) for all the details
8
8
 
9
- ## Development
10
- ### Without Docker
11
- You'll need to have [Node JS and NPM](https://nodejs.org/en/download) installed on your machine to run it locally.
9
+ ## Contribute
12
10
 
13
- #### Install Dependencies
14
- ```bash
15
- npm i
16
- ```
11
+ ### With Container Engine
12
+ > [!NOTE]
13
+ > If you use [🐳 Docker](https://app.docker.com/) instead of [🦦 Podman](https://podman.io/), just replace `podman-compose` with `docker compose`, and `podman` with `docker` in code examples below.
17
14
 
18
- #### Watch File Changes
19
- This command will watch for your changes and compile TypeScript to JavaScript files into `lib/js`
15
+ #### Build an Image
16
+ To build an image, navigate to the root of the project and run this command:
20
17
  ```bash
21
- npm run watch
18
+ podman-compose build
22
19
  ```
23
20
 
24
- ### With [Docker](https://www.docker.com/)
25
- #### Build the Image
26
- To build an image, navigate to the root of the project that contains `Dockerfile` and run this command:
21
+ Now, you'll have an image `smooth-loader` that you can use to create a container.
22
+
23
+
24
+ #### Create `node_modules`
25
+ Run this command to install npm packages and generate a `node_modules` directory on your local machine:
26
+
27
27
  ```bash
28
- docker compose build
28
+ podman-compose run --rm app npm i
29
29
  ```
30
30
 
31
- Now, you'll have an image `smooth-loader` that you can use to create a container.
32
-
33
31
  #### Create and Enter the Container
34
32
  To create and enter inside the container, run this command:
35
33
  ```bash
36
- docker compose run --rm app
34
+ podman-compose run --rm app sh
37
35
  ```
38
36
 
39
37
  You'll be able to run NPM commands inside of the container and commands:
40
38
  - `npm run watch` to make TypeScript watch for your changes and auto-compile everything to plain JavaScript
41
- - `npm run build` compile all of your TypeScript files to JavaScript
39
+ - `npm run build` compile all of your TypeScript files to JavaScript
@@ -6,8 +6,6 @@ services:
6
6
  container_name: smooth-loader
7
7
  build:
8
8
  context: .
9
+ dockerfile: Containerfile
9
10
  volumes:
10
- - .:/app
11
- - /app/node_modules
12
- ports:
13
- - 3000:5173
11
+ - .:/app:z
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smooth-loader",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "This package allows you to lazy load your images using IntersectionObserver technology. It supports loading background images as well as the regular images with img tag.",
5
5
  "main": "lib/js/index.js",
6
6
  "types": "lib/js",
@@ -8,7 +8,7 @@
8
8
  "license": "MIT",
9
9
  "homepage": "https://smooth-loader.github.io",
10
10
  "devDependencies": {
11
- "typescript": "^5.8.3"
11
+ "typescript": "^5.9.3"
12
12
  },
13
13
  "scripts": {
14
14
  "build": "tsc -p .",
@@ -21,4 +21,4 @@
21
21
  "lazy loading",
22
22
  "background image"
23
23
  ]
24
- }
24
+ }
package/Dockerfile DELETED
@@ -1,15 +0,0 @@
1
- FROM node:24-alpine
2
-
3
- RUN apk add --no-cache git
4
-
5
- WORKDIR /app
6
-
7
- COPY package.json .
8
-
9
- RUN npm install
10
-
11
- COPY . .
12
-
13
- EXPOSE 5173
14
-
15
- ENTRYPOINT ["sh"]