minista 2.4.0 → 2.4.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/README.md +1 -1
- package/dist/download.js +3 -3
- package/dist/generate.js +6 -0
- package/package.json +3 -3
package/README.md
CHANGED
package/dist/download.js
CHANGED
|
@@ -15,7 +15,7 @@ async function downloadFiles(entryPoints, remoteUrl, remoteName, downloadOutDir,
|
|
|
15
15
|
const html = await fs.readFile(entryPoint, "utf8");
|
|
16
16
|
const parsedHtml = parseHtml(html);
|
|
17
17
|
const imgTags = parsedHtml.getElementsByTagName("img");
|
|
18
|
-
const
|
|
18
|
+
const sourceTags = parsedHtml.getElementsByTagName("source");
|
|
19
19
|
if (imgTags.length > 0) {
|
|
20
20
|
for (const item of imgTags) {
|
|
21
21
|
const itemSrc = item.getAttribute("src");
|
|
@@ -34,8 +34,8 @@ async function downloadFiles(entryPoints, remoteUrl, remoteName, downloadOutDir,
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
if (
|
|
38
|
-
for (const item of
|
|
37
|
+
if (sourceTags.length > 0) {
|
|
38
|
+
for (const item of sourceTags) {
|
|
39
39
|
const itemSrc = item.getAttribute("src");
|
|
40
40
|
const itemSrcset = item.getAttribute("srcset");
|
|
41
41
|
if (itemSrc && matchSrcUrls(itemSrc, remoteUrl)) {
|
package/dist/generate.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import fs from "fs-extra";
|
|
2
3
|
import path from "path";
|
|
3
4
|
import url from "url";
|
|
4
5
|
import { systemConfig } from "./system.js";
|
|
@@ -71,6 +72,11 @@ async function generateTempAssets(config, viteConfig) {
|
|
|
71
72
|
}
|
|
72
73
|
async function generatePartialHydration(config, mdxConfig, viteConfig) {
|
|
73
74
|
const moduleDir = systemConfig.temp.partialHydration.outDir + "/modules";
|
|
75
|
+
const moduleDirRelative = path.relative(".", moduleDir);
|
|
76
|
+
const moduleDirExists = fs.existsSync(moduleDirRelative);
|
|
77
|
+
if (!moduleDirExists) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
74
80
|
const moduleFilePaths = await getFilePaths(moduleDir, "txt");
|
|
75
81
|
if (moduleFilePaths.length === 0) {
|
|
76
82
|
return;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "minista",
|
|
3
3
|
"description": "Next.js Like Development with 100% Static Generate",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.3",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minista": "./bin/minista.js"
|
|
7
7
|
},
|
|
@@ -101,8 +101,8 @@
|
|
|
101
101
|
"@types/js-beautify": "^1.13.3",
|
|
102
102
|
"@types/mime-types": "^2.1.1",
|
|
103
103
|
"@types/node": "^17.0.31",
|
|
104
|
-
"@types/react": "^17.0.
|
|
105
|
-
"@types/react-dom": "^17.0.
|
|
104
|
+
"@types/react": "^17.0.45",
|
|
105
|
+
"@types/react-dom": "^17.0.16",
|
|
106
106
|
"@types/react-helmet": "^6.1.5",
|
|
107
107
|
"@types/uuid": "^8.3.4",
|
|
108
108
|
"react": "^17.0.2",
|