@dianzhong/create-harness-app 0.1.3 → 0.1.4
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.mjs +4 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -329,6 +329,10 @@ async function overlay(projectRoot, config) {
|
|
|
329
329
|
if (config.harness !== "none") {
|
|
330
330
|
await overlayHarness(projectRoot, config.harness);
|
|
331
331
|
merge(config.harness === "full" ? HARNESS_FULL_PKG : HARNESS_MINIMAL_PKG);
|
|
332
|
+
const existingScripts = pkg.scripts ?? {};
|
|
333
|
+
if (existingScripts.format?.includes("--write") && !existingScripts["format:check"]) {
|
|
334
|
+
add.scripts["format:check"] = existingScripts.format.replace("--write", "--check");
|
|
335
|
+
}
|
|
332
336
|
}
|
|
333
337
|
pkg = mergePackageJson(pkg, add);
|
|
334
338
|
await writeJson(pkgPath, pkg);
|