html-bundle 6.1.2 → 6.1.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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 Fabian Krutsch
3
+ Copyright (c) 2020 Fabian Klingenberg
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
package/dist/bundle.mjs CHANGED
@@ -48,9 +48,9 @@ async function build(files, firstRun = true) {
48
48
  await createDir(file);
49
49
  if (!SUPPORTED_FILES.test(file)) {
50
50
  if (handlerFile) {
51
- const { stdout } = await execFilePromise("node", [handlerFile, file]);
52
- if (String(stdout))
51
+ execFilePromise("node", [handlerFile, file]).then(({ stdout }) => {
53
52
  console.log("📋 Logging Handler: ", String(stdout));
53
+ });
54
54
  }
55
55
  else {
56
56
  if ((await lstat(file)).isDirectory())
@@ -160,18 +160,18 @@ async function build(files, firstRun = true) {
160
160
  }
161
161
  else if (!file.endsWith(".css")) {
162
162
  if (handlerFile) {
163
- const { stdout } = await execFilePromise("node", [handlerFile, file]);
164
- if (String(stdout))
163
+ execFilePromise("node", [handlerFile, file]).then(({ stdout }) => {
165
164
  console.log("📋 Logging Handler: ", String(stdout));
165
+ });
166
166
  }
167
167
  else {
168
168
  await fileCopy(file);
169
169
  }
170
170
  }
171
171
  else if (handlerFile) {
172
- const { stdout } = await execFilePromise("node", [handlerFile, file]);
173
- if (String(stdout))
172
+ execFilePromise("node", [handlerFile, file]).then(({ stdout }) => {
174
173
  console.log("📋 Logging Handler: ", String(stdout));
174
+ });
175
175
  }
176
176
  serverSentEvents?.({ file, html });
177
177
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-bundle",
3
- "version": "6.1.2",
3
+ "version": "6.1.3",
4
4
  "description": "A very simple bundler for HTML SFC",
5
5
  "bin": "./dist/bundle.mjs",
6
6
  "types": "./src/config.d.ts",
@@ -16,15 +16,15 @@
16
16
  "esbuild",
17
17
  "hydro-js"
18
18
  ],
19
- "author": "Fabian Krutsch <f.krutsch@gmx.de> (https://krutsch.netlify.app/)",
19
+ "author": "Fabian Klingenberg <klingenberg.fabian@gmx.de> (https://klingenberg.netlify.app/)",
20
20
  "license": "MIT",
21
21
  "devDependencies": {
22
- "@types/cssnano": "^5.0.0",
22
+ "@types/cssnano": "^5.1.0",
23
23
  "@types/glob": "^8.1.0",
24
24
  "@types/html-minifier-terser": "^7.0.2",
25
25
  "@types/parse5": "^7.0.0",
26
26
  "@types/postcss-load-config": "^3.0.1",
27
- "typescript": "^5.3.3"
27
+ "typescript": "^5.5.4"
28
28
  },
29
29
  "repository": {
30
30
  "type": "git",
@@ -32,19 +32,19 @@
32
32
  },
33
33
  "bugs": "https://github.com/Krutsch/html-bundle/issues",
34
34
  "dependencies": {
35
- "@fastify/static": "^7.0.1",
35
+ "@fastify/static": "^7.0.4",
36
36
  "@web/parse5-utils": "^2.1.0",
37
37
  "await-spawn": "^4.0.2",
38
38
  "chokidar": "^3.6.0",
39
- "critters": "^0.0.20",
40
- "cssnano": "^6.0.3",
41
- "esbuild": "^0.20.0",
42
- "fastify": "^4.26.1",
43
- "glob": "^10.3.10",
39
+ "critters": "^0.0.24",
40
+ "cssnano": "^7.0.4",
41
+ "esbuild": "^0.23.0",
42
+ "fastify": "^4.28.1",
43
+ "glob": "^11.0.0",
44
44
  "html-minifier-terser": "^7.2.0",
45
- "hydro-js": "^1.5.14",
45
+ "hydro-js": "^1.5.19",
46
46
  "parse5": "^7.1.2",
47
- "postcss": "^8.4.35",
48
- "postcss-load-config": "^5.0.3"
47
+ "postcss": "^8.4.41",
48
+ "postcss-load-config": "^6.0.1"
49
49
  }
50
50
  }
package/src/bundle.mts CHANGED
@@ -71,8 +71,9 @@ async function build(files: string[], firstRun = true) {
71
71
 
72
72
  if (!SUPPORTED_FILES.test(file)) {
73
73
  if (handlerFile) {
74
- const { stdout } = await execFilePromise("node", [handlerFile, file]);
75
- if (String(stdout)) console.log("📋 Logging Handler: ", String(stdout));
74
+ execFilePromise("node", [handlerFile, file]).then(({ stdout }) => {
75
+ console.log("📋 Logging Handler: ", String(stdout));
76
+ });
76
77
  } else {
77
78
  if ((await lstat(file)).isDirectory()) continue;
78
79
  await fileCopy(file);
@@ -198,15 +199,16 @@ async function build(files: string[], firstRun = true) {
198
199
  await minifyCode();
199
200
  } else if (!file.endsWith(".css")) {
200
201
  if (handlerFile) {
201
- const { stdout } = await execFilePromise("node", [handlerFile, file]);
202
- if (String(stdout))
202
+ execFilePromise("node", [handlerFile, file]).then(({ stdout }) => {
203
203
  console.log("📋 Logging Handler: ", String(stdout));
204
+ });
204
205
  } else {
205
206
  await fileCopy(file);
206
207
  }
207
208
  } else if (handlerFile) {
208
- const { stdout } = await execFilePromise("node", [handlerFile, file]);
209
- if (String(stdout)) console.log("📋 Logging Handler: ", String(stdout));
209
+ execFilePromise("node", [handlerFile, file]).then(({ stdout }) => {
210
+ console.log("📋 Logging Handler: ", String(stdout));
211
+ });
210
212
  }
211
213
 
212
214
  serverSentEvents?.({ file, html });