@homepages/create-workspace 0.8.0 → 0.9.0-dev-20260719224319
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/index.js
CHANGED
|
@@ -10,11 +10,20 @@ import { fileURLToPath } from "node:url";
|
|
|
10
10
|
import { stampTree } from "./stamp.js";
|
|
11
11
|
const ASSETS = join(dirname(fileURLToPath(import.meta.url)), "..", "scaffold");
|
|
12
12
|
const NAME_RE = /^[a-z][a-z0-9-]*$/;
|
|
13
|
+
/**
|
|
14
|
+
* The authoring ESLint preset's caret pin. Unlike the kit it cannot be derived from
|
|
15
|
+
* this package's own version — @homepages/eslint-plugin-template versions
|
|
16
|
+
* independently — so it is a committed constant, bumped when that package releases a
|
|
17
|
+
* new minor. A scaffolded workspace whose config imports a preset it does not depend
|
|
18
|
+
* on fails at `npm install`, not at lint time, so this is not optional.
|
|
19
|
+
*/
|
|
20
|
+
const ESLINT_PLUGIN_VERSION = "0.1.0";
|
|
13
21
|
export async function scaffoldWorkspace(name, targetDir, opts) {
|
|
14
22
|
await mkdir(targetDir, { recursive: true });
|
|
15
23
|
await stampTree(join(ASSETS, "workspace"), targetDir, {
|
|
16
24
|
WORKSPACE_NAME: name,
|
|
17
25
|
KIT_VERSION: opts.kitVersion,
|
|
26
|
+
ESLINT_PLUGIN_VERSION: opts.eslintPluginVersion ?? ESLINT_PLUGIN_VERSION,
|
|
18
27
|
});
|
|
19
28
|
await stampTree(join(ASSETS, "template"), join(targetDir, "templates", "starter"), {
|
|
20
29
|
TEMPLATE_KEY: "starter",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@homepages/create-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0-dev-20260719224319",
|
|
4
4
|
"description": "Scaffold a HomePages template workspace.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
"check": "npm run typecheck && npm run build && npm run test"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
+
"@types/semver": "^7.5.8",
|
|
29
|
+
"semver": "^7.6.3",
|
|
28
30
|
"tsx": "^4.19.2",
|
|
29
31
|
"typescript": "^5.7.2"
|
|
30
32
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FixtureModule } from "@homepages/template-kit";
|
|
2
|
-
import { luxuryMultiUnit
|
|
2
|
+
import { luxuryMultiUnit } from "@homepages/template-kit/fixtures";
|
|
3
3
|
|
|
4
4
|
// Base content the section is designed for. Nullability coverage (each optional
|
|
5
5
|
// slot rendered empty) is derived automatically from schema.ts — no fixture
|
|
@@ -12,12 +12,12 @@ const fixtures: FixtureModule = {
|
|
|
12
12
|
base: {
|
|
13
13
|
slots: {
|
|
14
14
|
headline: luxuryMultiUnit.facts.address.display,
|
|
15
|
+
// State the asset id, exactly as a saved page does — the preview server
|
|
16
|
+
// resolves it to a URL and a responsive ladder, the same way the API does
|
|
17
|
+
// when the page is published. A fixture never states a URL.
|
|
15
18
|
hero_image: {
|
|
16
19
|
photo_id: heroImage.id,
|
|
17
|
-
url: heroImage.url,
|
|
18
20
|
alt: heroImage.alt,
|
|
19
|
-
// Height set to a 16:9 ratio to match the slot's locked crop.
|
|
20
|
-
responsive: mkResponsive(heroImage.url, 2048, 1152),
|
|
21
21
|
},
|
|
22
22
|
blurb: "A 12-unit mansard Victorian in Jamaica Plain, moments from the Emerald Necklace.",
|
|
23
23
|
},
|