@gridland/demo 0.2.7 → 0.2.9

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.
Files changed (2) hide show
  1. package/bin/cli.mjs +8 -1
  2. package/package.json +1 -1
package/bin/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { execSync, spawnSync } from "node:child_process";
3
- import { mkdtempSync, rmSync } from "node:fs";
3
+ import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
4
4
  import { tmpdir } from "node:os";
5
5
  import { join } from "node:path";
6
6
 
@@ -61,6 +61,13 @@ try {
61
61
 
62
62
  const repoDir = join(workDir, "gridland");
63
63
 
64
+ // Trim workspaces to only what demos need — avoids installing heavy deps
65
+ // like Next.js that fail in Alpine/musl containers (@next/swc-linux-arm64-gnu)
66
+ const pkgPath = join(repoDir, "package.json");
67
+ const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
68
+ pkg.workspaces = ["packages/web", "packages/ui", "packages/testing"];
69
+ writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
70
+
64
71
  if (useBun) {
65
72
  execSync("bun install", { cwd: repoDir, stdio: ["ignore", "ignore", "inherit"] });
66
73
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridland/demo",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "Run gridland component demos from anywhere",
5
5
  "bin": {
6
6
  "gridland-demo": "./bin/cli.mjs"