@michijs/dev-server 0.8.6-beta.9 → 0.8.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.
|
@@ -6,7 +6,7 @@ import { fileURLToPath } from "url";
|
|
|
6
6
|
import { basename, dirname, resolve } from "path";
|
|
7
7
|
import { getLocalURL } from "../utils/getLocalURL.js";
|
|
8
8
|
import { assetsSizes } from "../constants.js";
|
|
9
|
-
import { chromium } from "playwright-core";
|
|
9
|
+
import { chromium, } from "playwright-core";
|
|
10
10
|
import { exec } from "child_process";
|
|
11
11
|
import { getColor } from "colorthief";
|
|
12
12
|
import { packageJson } from "../utils/packageJson.js";
|
|
@@ -41,9 +41,7 @@ const generateFavicon = async (src, dest) => {
|
|
|
41
41
|
};
|
|
42
42
|
config.watch = false;
|
|
43
43
|
config.openBrowser = false;
|
|
44
|
-
|
|
45
|
-
headless: true,
|
|
46
|
-
});
|
|
44
|
+
let browser;
|
|
47
45
|
const port = await new Promise(async (resolve) => {
|
|
48
46
|
const { start } = await import("./start.js");
|
|
49
47
|
start((port) => resolve(port));
|
|
@@ -123,6 +121,9 @@ export async function generateScreenshots() {
|
|
|
123
121
|
}
|
|
124
122
|
export async function generateAssets(callback, src) {
|
|
125
123
|
await installPlaywright();
|
|
124
|
+
browser = await chromium.launch({
|
|
125
|
+
headless: true,
|
|
126
|
+
});
|
|
126
127
|
const { default: sharp } = await import("sharp");
|
|
127
128
|
rmSync(generatedPath, { recursive: true, force: true });
|
|
128
129
|
if (!existsSync(generatedPath))
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@michijs/dev-server",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.8.6
|
|
4
|
+
"version": "0.8.6",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/michijs/dev-server.git"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@michijs/tsconfig": "0.0.4",
|
|
33
|
-
"@types/node": "22.15.
|
|
33
|
+
"@types/node": "22.15.30",
|
|
34
34
|
"@types/yargs": "17.0.33",
|
|
35
35
|
"typescript": "5.8.3"
|
|
36
36
|
},
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"colorthief": "2.6.0",
|
|
57
57
|
"@types/web-app-manifest": "1.0.9",
|
|
58
|
-
"esbuild": "0.25.
|
|
58
|
+
"esbuild": "0.25.5",
|
|
59
59
|
"node-watch": "0.7.4",
|
|
60
60
|
"open": "10.1.2",
|
|
61
61
|
"playwright-core": "1.52.0",
|
|
62
|
-
"sharp": "0.34.
|
|
63
|
-
"yargs": "
|
|
62
|
+
"sharp": "0.34.2",
|
|
63
|
+
"yargs": "18.0.0"
|
|
64
64
|
}
|
|
65
65
|
}
|