@vojtaholik/static-kit-cli 2.0.0 → 2.1.0
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/package.json +2 -2
- package/src/commands/dev.ts +0 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vojtaholik/static-kit-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"static-kit": "./src/cli.ts"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@vojtaholik/static-kit-core": "^2.
|
|
20
|
+
"@vojtaholik/static-kit-core": "^2.1.0",
|
|
21
21
|
"lightningcss": "^1.28.2",
|
|
22
22
|
"browserslist": "^4.24.4"
|
|
23
23
|
},
|
package/src/commands/dev.ts
CHANGED
|
@@ -65,18 +65,6 @@ const getPageByPath = pagesModule.getPageByPath as (
|
|
|
65
65
|
path: string
|
|
66
66
|
) => PageConfig | undefined;
|
|
67
67
|
|
|
68
|
-
// Try to load cms-blocks if it exists
|
|
69
|
-
let cmsBlocks: Record<string, unknown> = {};
|
|
70
|
-
try {
|
|
71
|
-
const cmsPath = config.cmsBlocksFile
|
|
72
|
-
? join(cwd, config.cmsBlocksFile)
|
|
73
|
-
: join(cwd, "cms-blocks.ts");
|
|
74
|
-
const cmsBlocksModule = await import(`file://${cmsPath}`);
|
|
75
|
-
cmsBlocks = cmsBlocksModule.cmsBlocks ?? cmsBlocksModule.default ?? {};
|
|
76
|
-
} catch {
|
|
77
|
-
// No cms-blocks file, that's fine
|
|
78
|
-
}
|
|
79
|
-
|
|
80
68
|
const PORT = config.devPort;
|
|
81
69
|
const publicPath = config.publicPath; // e.g. "/public"
|
|
82
70
|
|
|
@@ -268,7 +256,6 @@ Bun.serve({
|
|
|
268
256
|
title: p.title,
|
|
269
257
|
})),
|
|
270
258
|
blocks: blockRegistry.types(),
|
|
271
|
-
schemas: cmsBlocks,
|
|
272
259
|
});
|
|
273
260
|
}
|
|
274
261
|
|
|
@@ -312,7 +299,6 @@ Bun.serve({
|
|
|
312
299
|
templateFile: `${blocksDir}/${block.type}.block.html`,
|
|
313
300
|
}
|
|
314
301
|
: null,
|
|
315
|
-
schema: block ? cmsBlocks[block.type] : null,
|
|
316
302
|
});
|
|
317
303
|
} catch (err) {
|
|
318
304
|
return Response.json(
|