auto-image-converter 1.1.9 → 1.1.10

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.
Files changed (2) hide show
  1. package/bin/watcher.mjs +5 -9
  2. package/package.json +1 -1
package/bin/watcher.mjs CHANGED
@@ -13,13 +13,9 @@ const watchPath = path.join(absWatchDir, "**", "*.{png,jpg,jpeg}");
13
13
 
14
14
  console.log(`👀 Watching for image changes on: ${watchPath}`);
15
15
 
16
- chokidar
17
- .watch(watchPath, { ignoreInitial: true })
18
- .on("add", async (filePath) => {
16
+ chokidar.watch(baseDirPosix, { ignoreInitial: true }).on("add", (filePath) => {
17
+ if (/\.(png|jpe?g)$/i.test(filePath)) {
19
18
  console.log(`➕ New image: ${filePath}`);
20
- try {
21
- await convertImages(config);
22
- } catch (err) {
23
- console.error("Ошибка при конвертации:", err.message);
24
- }
25
- });
19
+ // ...
20
+ }
21
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auto-image-converter",
3
- "version": "1.1.9",
3
+ "version": "1.1.10",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "auto-convert-images": "./bin/index.js",