@theholocron/cli 3.18.1 → 3.18.2
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/cli.mjs +10 -2
- package/dist/cli.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -1089,8 +1089,6 @@ async function runNew(input) {
|
|
|
1089
1089
|
print(` Patching files…`);
|
|
1090
1090
|
const variants = deriveVariants(templateSlug, input.name);
|
|
1091
1091
|
variants.unshift([`theholocron/${templateSlug}`, `${org}/${input.name}`]);
|
|
1092
|
-
const displayName = input.name.split("-").map(cap).join(" ");
|
|
1093
|
-
variants.push(["<display_name>", displayName]);
|
|
1094
1092
|
const filesPatched = patchFiles(repoDir, variants, input.description, input.homepage, input.runtimeEnvironment, print, readFn, writeFn, walkFn);
|
|
1095
1093
|
print(` ${filesPatched.length} file${filesPatched.length === 1 ? "" : "s"} patched`);
|
|
1096
1094
|
if (input.description !== void 0 || input.homepage !== void 0) try {
|
|
@@ -1100,6 +1098,16 @@ async function runNew(input) {
|
|
|
1100
1098
|
writeFn(pkgJsonPath, JSON.stringify(pkg, null, 2) + "\n");
|
|
1101
1099
|
print(` ✓ package.json (description/homepage)`);
|
|
1102
1100
|
} catch {}
|
|
1101
|
+
const displayName = input.name.split("-").map(cap).join(" ");
|
|
1102
|
+
const rootTsconfigPath = path.join(repoDir, "tsconfig.json");
|
|
1103
|
+
try {
|
|
1104
|
+
const tsconfig = JSON.parse(readFn(rootTsconfigPath));
|
|
1105
|
+
if (typeof tsconfig["display"] === "string") {
|
|
1106
|
+
tsconfig["display"] = displayName;
|
|
1107
|
+
writeFn(rootTsconfigPath, JSON.stringify(tsconfig, null, 2) + "\n");
|
|
1108
|
+
print(` ✓ tsconfig.json (display)`);
|
|
1109
|
+
}
|
|
1110
|
+
} catch {}
|
|
1103
1111
|
const configContent = generateHolocronConfig({
|
|
1104
1112
|
name: input.name,
|
|
1105
1113
|
type: input.type,
|