html-bundle 6.0.5 → 6.0.6

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/dist/bundle.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { performance } from "perf_hooks";
3
- import { readFile, rm, writeFile, readdir } from "fs/promises";
3
+ import { readFile, rm, writeFile, readdir, lstat } from "fs/promises";
4
4
  import { execFile } from "child_process";
5
5
  import { promisify } from "util";
6
6
  import glob from "glob";
@@ -52,6 +52,8 @@ async function build(err, files, firstRun = true) {
52
52
  console.log("📋 Logging Handler: ", String(stdout));
53
53
  }
54
54
  else {
55
+ if ((await lstat(file)).isDirectory())
56
+ continue;
55
57
  await fileCopy(file);
56
58
  }
57
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-bundle",
3
- "version": "6.0.5",
3
+ "version": "6.0.6",
4
4
  "description": "A very simple bundler for HTML SFC",
5
5
  "bin": "./dist/bundle.mjs",
6
6
  "scripts": {
@@ -18,7 +18,7 @@
18
18
  "author": "Fabian Krutsch <f.krutsch@gmx.de> (https://krutsch.netlify.app/)",
19
19
  "license": "MIT",
20
20
  "devDependencies": {
21
- "@types/cssnano": "^4.0.1",
21
+ "@types/cssnano": "^5.0.0",
22
22
  "@types/glob": "^7.2.0",
23
23
  "@types/html-minifier-terser": "^6.1.0",
24
24
  "@types/parse5": "^6.0.3",
@@ -36,14 +36,14 @@
36
36
  "chokidar": "^3.5.2",
37
37
  "critical": "^4.0.1",
38
38
  "cssnano": "^5.0.14",
39
- "esbuild": "^0.14.9",
39
+ "esbuild": "^0.14.10",
40
40
  "fastify": "^3.25.3",
41
41
  "fastify-static": "^4.5.0",
42
42
  "glob": "^7.2.0",
43
43
  "html-minifier-terser": "^6.1.0",
44
- "hydro-js": "^1.5.3",
44
+ "hydro-js": "^1.5.7",
45
45
  "parse5": "^6.0.1",
46
46
  "postcss": "^8.4.5",
47
- "postcss-load-config": "^3.1.0"
47
+ "postcss-load-config": "^3.1.1"
48
48
  }
49
49
  }
package/src/bundle.mts CHANGED
@@ -3,7 +3,7 @@
3
3
  import type { TextNode } from "parse5";
4
4
  import type { AcceptedPlugin } from "postcss";
5
5
  import { performance } from "perf_hooks";
6
- import { readFile, rm, writeFile, readdir } from "fs/promises";
6
+ import { readFile, rm, writeFile, readdir, lstat } from "fs/promises";
7
7
  import { execFile } from "child_process";
8
8
  import { promisify } from "util";
9
9
  import glob from "glob";
@@ -71,6 +71,7 @@ async function build(err: any, files: string[], firstRun = true) {
71
71
  const { stdout } = await execFilePromise("node", [handlerFile, file]);
72
72
  if (String(stdout)) console.log("📋 Logging Handler: ", String(stdout));
73
73
  } else {
74
+ if ((await lstat(file)).isDirectory()) continue;
74
75
  await fileCopy(file);
75
76
  }
76
77
  } else {