@contentful/experience-design-system-cli 2.34.5-dev-build-a88e62a.0 → 2.34.5-dev-build-f2a7816.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/bin/cli.js +5 -13
- package/dist/package.json +1 -1
- package/dist/src/index.js +200 -267
- package/package.json +6 -6
package/bin/cli.js
CHANGED
|
@@ -11,7 +11,6 @@ process.on("warning", (w) => {
|
|
|
11
11
|
// Skipped when src/ doesn't exist (e.g. npm-installed users).
|
|
12
12
|
import { existsSync, statSync, readdirSync } from "node:fs";
|
|
13
13
|
import { execFileSync } from "node:child_process";
|
|
14
|
-
import { createRequire } from "node:module";
|
|
15
14
|
import { fileURLToPath } from "node:url";
|
|
16
15
|
import { dirname, resolve, join } from "node:path";
|
|
17
16
|
|
|
@@ -43,19 +42,12 @@ if (
|
|
|
43
42
|
const distMtime = statSync(distEntry).mtimeMs;
|
|
44
43
|
if (newestMtime(srcDir) > distMtime) {
|
|
45
44
|
process.stderr.write("⚙ Source changed — rebuilding...\n");
|
|
46
|
-
|
|
47
|
-
// node_modules/.bin/tsc shim: on Windows the extensionless shim is a POSIX
|
|
48
|
-
// sh script (the runnable one is tsc.CMD), so exec'ing it fails there.
|
|
49
|
-
const tsc = createRequire(import.meta.url).resolve("typescript/bin/tsc");
|
|
45
|
+
const tsc = join(pkgRoot, "node_modules", ".bin", "tsc");
|
|
50
46
|
try {
|
|
51
|
-
execFileSync(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
stdio: ["ignore", "ignore", "inherit"],
|
|
56
|
-
cwd: pkgRoot,
|
|
57
|
-
},
|
|
58
|
-
);
|
|
47
|
+
execFileSync(tsc, ["-p", join(pkgRoot, "tsconfig.build.json")], {
|
|
48
|
+
stdio: ["ignore", "ignore", "inherit"],
|
|
49
|
+
cwd: pkgRoot,
|
|
50
|
+
});
|
|
59
51
|
process.stderr.write("✓ Build complete\n");
|
|
60
52
|
} catch {
|
|
61
53
|
process.stderr.write("✗ Build failed — running with existing dist\n");
|
package/dist/package.json
CHANGED