@kaviyarasan022/image-compressor-target 1.0.1 → 1.0.3

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.
@@ -0,0 +1,38 @@
1
+ name: Publish npm package
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main # Run only on push to main branch
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+
15
+ - name: Use Node.js
16
+ uses: actions/setup-node@v3
17
+ with:
18
+ node-version: 20
19
+ registry-url: https://registry.npmjs.org/
20
+
21
+ - name: Authenticate npm
22
+ run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
23
+
24
+ - name: Install dependencies
25
+ run: npm install
26
+
27
+ - name: Bump version
28
+ run: |
29
+ npm version patch -m "ci: bump version to %s"
30
+
31
+ - name: Publish package
32
+ run: npm publish --access public
33
+
34
+ - name: Push changes & tags
35
+ run: |
36
+ git config user.name "github-actions"
37
+ git config user.email "github-actions@github.com"
38
+ git push origin main --tags
Binary file
package/index.js CHANGED
@@ -4,7 +4,7 @@ const { compressToTarget } = require("./lib/compressor");
4
4
 
5
5
  /**
6
6
 
7
- *
7
+ * testss
8
8
  * @param {string} inputPath - Path to input image file (jpg/png/webp)
9
9
  * @param {string} outputPath - Path where compressed image will be saved
10
10
  * @param {string|number} targetSize - e.g. "300kb", "1mb", or bytes number
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaviyarasan022/image-compressor-target",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "A Node.js CLI tool to compress images to a target size.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -9,10 +9,19 @@
9
9
  "scripts": {
10
10
  "test": "echo \"Error: no test specified\" && exit 1"
11
11
  },
12
- "keywords": ["image", "compressor", "cli", "tool", "image-optimization"],
12
+ "keywords": [
13
+ "image",
14
+ "compressor",
15
+ "cli",
16
+ "tool",
17
+ "image-optimization"
18
+ ],
13
19
  "author": "Kaviyarasan M",
14
20
  "license": "MIT",
15
21
  "dependencies": {
16
22
  "axios": "^1.12.2"
23
+ },
24
+ "devDependencies": {
25
+ "husky": "^9.1.7"
17
26
  }
18
27
  }